protected final boolean _loadToHaveAtLeast(int minAvailable) throws IOException {
  if (_inputStream == null) {
    return false;
  }
  int amount=_inputEnd - _inputPtr;
  if (amount > 0 && _inputPtr > 0) {
    _currInputProcessed+=_inputPtr;
    _currInputRowStart-=_inputPtr;
    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");
      }
      return false;
    }
    _inputEnd+=count;
  }
  return true;
}

protected final boolean _loadToHaveAtLeast ( int minAvailable ) throws IOException { if ( _inputStream == null ) { return false ; } int amount = _inputEnd - _inputPtr ; if ( amount > 0 && _inputPtr > 0 ) { _currInputProcessed += _inputPtr ; _currInputRowStart -= _inputPtr ; 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" ) ; } return false ; } _inputEnd += count ; } return true ; }
helper method that will try to load at least specified number bytes in input buffer , possible moving existing data around if necessary
