public FilterByteBuffer get ( byte [ ] dst , int offset , int length ) throws IOException { checkIn ( ) ; int len = length ; int count = 100 ; while ( len > 0 && count > 0 ) { int rc = in . read ( dst , offset + length - len , len ) ; if ( rc == - 1 ) { throw new EOFException ( ) ; } len -= rc ; count -- ; } if ( count == 0 ) { throw new IOException ( "couldn't fill buffer after 100 tries" ) ; } position += length ; return this ; }
Tries to read length bytes to dst .