Applications that need to define a subclass of
OutputStream
must always provide at least a method
that writes one byte of output.
java.io.BufferedOutputStream
, java.io.ByteArrayOutputStream
, java.io.DataOutputStream
, java.io.FilterOutputStream
, java.io.InputStream
, java.io.OutputStream#write(int)
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | close()
Implements java. Closes this output stream and releases any system resources associated with this stream. |
public void | flush()
Implements java. Flushes this output stream and forces any buffered output bytes to be written out. |
public static OutputStream | Returns: anOutputStream which discards all bytesReturns a new |
public abstract void | |
public void | |
public void | write(byte[]
the data. b, int the start offset in the data. off, int the number of bytes to write. len)Writes |
OutputStream | back to summary |
---|---|
public OutputStream() Constructor for subclasses to call. |
close | back to summary |
---|---|
public void close() throws IOException Implements java. Closes this output stream and releases any system resources
associated with this stream. The general contract of Implementation Specification The
|
flush | back to summary |
---|---|
public void flush() throws IOException Implements java. Flushes this output stream and forces any buffered output bytes
to be written out. The general contract of If the intended destination of this stream is an abstraction provided by the underlying operating system, for example a file, then flushing the stream guarantees only that bytes previously written to the stream are passed to the operating system for writing; it does not guarantee that they are actually written to a physical device such as a disk drive. Implementation Specification The
|
nullOutputStream | back to summary |
---|---|
public static OutputStream nullOutputStream() Returns a new While the stream is open, the The
|
write | back to summary |
---|---|
public abstract void write(int b) throws IOException Writes the specified byte to this output stream. The general
contract for
|
write | back to summary |
---|---|
public void write(byte[] b) throws IOException Writes
|
write | back to summary |
---|---|
public void write(byte[] b, int off, int len) throws IOException Writes
If
If Implementation Specification The API Note Subclasses are encouraged to override this method and provide a more efficient implementation.
|