bson/src/main/org/bson/LazyBSONObject.java
public int pipe(final OutputStream os) throws IOException {
        WritableByteChannel channel = Channels.newChannel(os);
        return channel.write(getBufferForInternalBytes());
    }
public int pipe(final OutputStream os) throws IOException {
        WritableByteChannel channel = Channels.newChannel(os);
        return channel.write(getBufferForInternalBytes());
    }
public int pipe ( final OutputStream os ) throws IOException { WritableByteChannel channel = Channels . newChannel ( os ) ; return channel . write ( getBufferForInternalBytes ( ) ) ; }
Pipe the raw bytes into the given output stream.

@param os the output stream
@return the number of bytes written
@throws IOException any IOException thrown by the output stream
Pipe the raw bytes into the given output stream .