Code example for BufferUnderflowException

0
     * {@inheritDoc} 
     */ 
    public byte get( int pos ) throws IOException {
        final int offsetPos = initialOffset() + pos;
        if ( offsetPos + 1 > limit() )
            throw new BufferUnderflowException();
        return getChunkForPos( offsetPos ).get( offsetPos % CHUNK_SIZE );
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    public LCByteBuffer get( byte[] dest, int offset, int length )
        throws IOException
    { 
        final int pos = position();
        getContiguousBytes( initialOffset() + pos, dest, offset, length );
        position( pos + length );
        return this;
    } 
Experience pair programming with AI  Get Codota for Java