Code example for ByteArrayOutputStream

Methods: writeTo

0
 
    public void writeTo(OutputStream out) throws IOException {
        if (mapContents != null) {
            out.write(mapContents);
        } else if (buffer != null) {
            buffer.writeTo(out);
        } else { 
            throw new IllegalStateException();
        } 
    } 
 
} 
Connect your IDE to all the code out there  Get Codota for Java