home *** CD-ROM | disk | FTP | other *** search
- package java.net;
-
- import java.io.FileOutputStream;
- import java.io.IOException;
-
- class SocketOutputStream extends FileOutputStream {
- private SocketImpl impl;
- private byte[] temp = new byte[1];
-
- SocketOutputStream(SocketImpl var1) throws IOException {
- super(var1.getFileDescriptor());
- this.impl = var1;
- }
-
- private native void socketWrite(byte[] var1, int var2, int var3) throws IOException;
-
- public void write(int var1) throws IOException {
- this.temp[0] = (byte)var1;
- this.socketWrite(this.temp, 0, 1);
- }
-
- public void write(byte[] var1) throws IOException {
- this.socketWrite(var1, 0, var1.length);
- }
-
- public void write(byte[] var1, int var2, int var3) throws IOException {
- this.socketWrite(var1, var2, var3);
- }
-
- public void close() throws IOException {
- this.impl.close();
- }
-
- protected void finalize() {
- }
- }
-