There's two ways to create a ByteBuffer, where one can be subdivided again.
If you have an already existing byte[], you can "wrap" it into a ByteBuffer to simplify processing:
byte[] reqBuffer = new byte[BUFFER_SIZE];
int readBytes = socketInputStream.read(reqBuffer);
final ByteBuffer ...