home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / rmi / transport / proxy / HttpSendOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.1 KB  |  49 lines

  1. package sun.rmi.transport.proxy;
  2.  
  3. import java.io.FilterOutputStream;
  4. import java.io.IOException;
  5. import java.io.OutputStream;
  6.  
  7. class HttpSendOutputStream extends FilterOutputStream {
  8.    HttpSendSocket owner;
  9.  
  10.    public HttpSendOutputStream(OutputStream var1, HttpSendSocket var2) throws IOException {
  11.       super(var1);
  12.       this.owner = var2;
  13.    }
  14.  
  15.    public void deactivate() {
  16.       super.out = null;
  17.    }
  18.  
  19.    public void write(int var1) throws IOException {
  20.       if (super.out == null) {
  21.          super.out = this.owner.writeNotify();
  22.       }
  23.  
  24.       super.out.write(var1);
  25.    }
  26.  
  27.    public void write(byte[] var1, int var2, int var3) throws IOException {
  28.       if (var3 != 0) {
  29.          if (super.out == null) {
  30.             super.out = this.owner.writeNotify();
  31.          }
  32.  
  33.          super.out.write(var1, var2, var3);
  34.       }
  35.    }
  36.  
  37.    public void flush() throws IOException {
  38.       if (super.out != null) {
  39.          super.out.flush();
  40.       }
  41.  
  42.    }
  43.  
  44.    public void close() throws IOException {
  45.       this.flush();
  46.       this.owner.close();
  47.    }
  48. }
  49.