// Creating a ByteBuffer out of an existing array of bytes
byte[] somebytes = new byte[100];

//...

// you can read/write the underlying somebytes array via the bb handle.
ByteBuffer bb = ByteBuffer.wrap( somebytes );

// bb.flip();  // not needed

int limit = bb.limit();  // how many chars in buffer

byte b = bb.get(); // read first byte