home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1999 April / DPPCPRO0499.ISO / April / Notes / 50b2wic.exe / DATA1.CAB / NotesProgramFilesJavaSupport / rt.jar / java / net / SocketOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-04-23  |  955 b   |  37 lines

  1. package java.net;
  2.  
  3. import java.io.FileOutputStream;
  4. import java.io.IOException;
  5.  
  6. class SocketOutputStream extends FileOutputStream {
  7.    private SocketImpl impl;
  8.    private byte[] temp = new byte[1];
  9.  
  10.    SocketOutputStream(SocketImpl var1) throws IOException {
  11.       super(var1.getFileDescriptor());
  12.       this.impl = var1;
  13.    }
  14.  
  15.    private native void socketWrite(byte[] var1, int var2, int var3) throws IOException;
  16.  
  17.    public void write(int var1) throws IOException {
  18.       this.temp[0] = (byte)var1;
  19.       this.socketWrite(this.temp, 0, 1);
  20.    }
  21.  
  22.    public void write(byte[] var1) throws IOException {
  23.       this.socketWrite(var1, 0, var1.length);
  24.    }
  25.  
  26.    public void write(byte[] var1, int var2, int var3) throws IOException {
  27.       this.socketWrite(var1, var2, var3);
  28.    }
  29.  
  30.    public void close() throws IOException {
  31.       this.impl.close();
  32.    }
  33.  
  34.    protected void finalize() {
  35.    }
  36. }
  37.