changes.
[IRC.git] / Robust / src / ClassLibrary / SocketOutputStream.java
1 public class SocketOutputStream extends OutputStream {
2   Socket s;
3   public SocketOutputStream(Socket s) {
4     this.s=s;
5   }
6
7   public void write(byte[] b) {
8     s.write(b);
9   }
10
11   public void write(int ch) {
12     byte[] b=new byte[1];
13     b[0]=(byte)ch;
14     s.write(b);
15   }
16
17   public void write(byte[] b, int offset, int len) {
18     s.write(b, offset, len);
19   }
20
21   public void close() {
22     s.close();
23   }
24 }