@Override protected boolean readIntoBuffer(int minLength){
  if (bufferSpaceLeft() < minLength) {
    increaseBufferSize(minLength + currentlyInBuffer());
  }
 else   if (buf.length - writePos < minLength) {
    compact();
  }
  int readSum=0;
  while (readSum < minLength && !datagrams.isEmpty()) {
    Datagram next=datagrams.removeFirst();
    int length=(int)next.getDuration();
    if (buf.length < writePos + length) {
      increaseBufferSize(writePos + length);
    }
    int read=readDatagram(next,buf,writePos);
    writePos+=read;
    readSum+=read;
  }
  if (dataProcessor != null) {
    dataProcessor.applyInline(buf,writePos - readSum,readSum);
  }
  return readSum >= minLength;
}

@ Override protected boolean readIntoBuffer ( int minLength ) { if ( bufferSpaceLeft ( ) < minLength ) { increaseBufferSize ( minLength + currentlyInBuffer ( ) ) ; } else if ( buf . length - writePos < minLength ) { compact ( ) ; } int readSum = 0 ; while ( readSum < minLength && ! datagrams . isEmpty ( ) ) { Datagram next = datagrams . removeFirst ( ) ; int length = ( int ) next . getDuration ( ) ; if ( buf . length < writePos + length ) { increaseBufferSize ( writePos + length ) ; } int read = readDatagram ( next , buf , writePos ) ; writePos += read ; readSum += read ; } if ( dataProcessor != null ) { dataProcessor . applyInline ( buf , writePos - readSum , readSum ) ; } return readSum >= minLength ; }
attempt to get more data from the input source . if less than this can be read , the possible amount will be read , but canreadmore ( ) will return false afterwards .
