Add methods to work with retrieving bytes from ByteBuffer.