List of utility methods to do ByteBuffer to OutputStream Convert
void | copyBufferToStream(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)); |
void | moveBufferToStream(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); |