question: protected final void _loadToHaveAtLeast ( int minAvailable ) throws IOException { if ( _inputStream == null ) { throw _constructError ( "Needed to read " + minAvailable + " bytes, reached end-of-input" ) ; } int amount = _inputEnd - _inputPtr ; _currInputProcessed += _inputPtr ; if ( amount > 0 && _inputPtr > 0 ) { System . arraycopy ( _inputBuffer , _inputPtr , _inputBuffer , 0 , amount ) ; _inputEnd = amount ; } else { _inputEnd = 0 ; } _inputPtr = 0 ; while ( _inputEnd < minAvailable ) { int count = _inputStream . read ( _inputBuffer , _inputEnd , _inputBuffer . length - _inputEnd ) ; if ( count < 1 ) { _closeInput ( ) ; if ( count == 0 ) { throw new IOException ( "InputStream.read() returned 0 characters when trying to read " + amount + " bytes" ) ; } throw _constructError ( "Needed to read " + minAvailable + " bytes, missed " + minAvailable + " before end-of-input" ) ; } _inputEnd += count ; } }
target:  Helper method that will try to load at least specified number bytes in input buffer, possible moving existing data around if necessary