/** Sets a new buffer. The position and total are reset, discarding any buffered bytes. */
public void setBuffer (byte[] bytes) {
ByteBuffer directBuffer = ByteBuffer.allocateDirect(bytes.length);
directBuffer.put(bytes);
directBuffer.position(0);
directBuffer.order(byteOrder);
setBuffer(directBuffer, 0, bytes.length);
}
/** Sets a new buffer. The position and total are reset, discarding any buffered bytes. */
public void setBuffer (ByteBuffer bytes, int offset, int count) {