First page Back Continue Last page Overview Graphics
Output Superclasses
OutputStream defines the same methods but for bytes:
int write(int c) //writes a single byte
int write(byte cbuf[]) //writes an array of bytes
int write(byte cbuf[], int offset, int length)
All of the streams — readers, writers, input streams, and output streams — are automatically opened when created.
Close a stream by calling its close method. A program should close a stream as soon as it is done with it, in order to free up system resources.