The OutputStream class defines three write method overloads, which are mirrors of the read method overloads in InputStream:
public void write (int b)
public void write (byte data)
public void write (byte data, int offset, int length)
- The first overload writes the lowest 8 bits of the integer b to this OutputStream.
- The second writes the content of a byte array to this OutputStream.
- The third overload writes length bytes of the data starting at offset offset.
- close() method closes the OutputStream.
- flush() method forces any buffered content to be written out to the sink.