Android Utililty Methods ByteBuffer to OutputStream Convert

List of utility methods to do ByteBuffer to OutputStream Convert

Description

The list of methods to do ByteBuffer to OutputStream Convert are organized into topic(s).

Method

voidcopyBufferToStream(OutputStream out, ByteBuffer in, int offset, int length)
Copy data from a buffer to an output stream.
if (in.hasArray()) {
    out.write(in.array(), in.arrayOffset() + offset, length);
} else {
    for (int i = 0; i < length; ++i) {
        out.write(in.get(offset + i));
voidmoveBufferToStream(OutputStream out, ByteBuffer in, int length)
Copy the data to the output stream and update position in buffer.
copyBufferToStream(out, in, in.position(), length);
skip(in, length);