changes for reading input files
[IRC.git] / Robust / src / ClassLibrary / SocketOutputStream.java
index 6e4167da32c30dc28f2cc8b678566d46212e5599..acec869432160b2d79290971853331800980629c 100644 (file)
@@ -1,8 +1,24 @@
 public class SocketOutputStream extends OutputStream {
-    Socket s;
-    public SocketOutputStream(Socket s) {
-       this.s=s;
-    }
+  Socket s;
+  public SocketOutputStream(Socket s) {
+    this.s=s;
+  }
 
-    
+  public void write(byte[] b) {
+    s.write(b);
+  }
+
+  public void write(int ch) {
+    byte[] b=new byte[1];
+    b[0]=(byte)ch;
+    s.write(b);
+  }
+
+  public void write(byte[] b, int offset, int len) {
+    s.write(b, offset, len);
+  }
+
+  public void close() {
+    s.close();
+  }
 }