Home » openjdk-7 » java » net » [javadoc | source]
public class: ZOutputStream [javadoc | source]

All Implemented Interfaces:
    Flushable, Closeable

This object models an output stream that sends data through a Connector instance. Everything is written to this output stream becomes a ZObject instance and gets sent through the Connector.
Field Summary
protected  Connector conn    The connector responsible for real sending. 
Fields inherited from java.io.ByteArrayOutputStream:
buf,  count
 public ZOutputStream(Connector conn) 
    This constructor only stores the argument into an internal field.
Method from java.net.ZOutputStream Summary:
flush,   write
Methods from java.io.ByteArrayOutputStream:
close,   reset,   size,   toByteArray,   toString,   toString,   toString,   write,   write,   writeTo
Methods from java.io.OutputStream:
close,   flush,   write,   write,   write
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.net.ZOutputStream Detail:
 public  void flush() throws IOException 
    This method really sends the stored data (if any) from the underlying ByteArrayOutputStream through the connector to the socket. After data sending, the underlying stream is reset to the empty state.
 public  void write(byte[] b,
    int off,
    int len) 
    This method writes the buffer to the underlying ByteArrayOutputStream and then flushes it using the connector through the flush method.