OutputStream class in java.io is used for stream byte output. Methods defined by OutputStream class:
write( ) method: It is used to write one byte to output stream.
void write(int x)
To write a byte array to output stream:
void write(byte buffer[ ])
To write a sub range of nbytes from buffer array.
void write(byte buffer[ ], int offset, int nbytes)
close method: It is used to close an output stream.
void close( )
flush( ) method: It is used to flush output buffers.
void flush( )