public final ByteBuffer get ( byte [ ] dest , int off , int len ) { int length = dest . length ; if ( off < 0 || len < 0 || ( long ) off + ( long ) len > length ) { throw new IndexOutOfBoundsException ( ) ; } if ( len > remaining ( ) ) { throw new BufferUnderflowException ( ) ; } for ( int i = 0 ; i < len ; i ++ ) { dest [ i + off ] = get ( position + i ) ; } position += len ; return this ; }
Reads bytes from the current position into the specified byte array starting at the specified offset and increases the position by the number of bytes read .