private void readData(long absolutePosition,ByteBuffer target,int length){
  int remaining=length;
  while (remaining > 0) {
    dropFragmentsTo(absolutePosition);
    int positionInFragment=(int)(absolutePosition - totalBytesDropped);
    int toCopy=Math.min(remaining,fragmentLength - positionInFragment);
    target.put(dataQueue.peek(),positionInFragment,toCopy);
    absolutePosition+=toCopy;
    remaining-=toCopy;
  }
}

private void readData ( long absolutePosition , ByteBuffer target , int length ) { int remaining = length ; while ( remaining > 0 ) { dropFragmentsTo ( absolutePosition ) ; int positionInFragment = ( int ) ( absolutePosition - totalBytesDropped ) ; int toCopy = Math . min ( remaining , fragmentLength - positionInFragment ) ; target . put ( dataQueue . peek ( ) , positionInFragment , toCopy ) ; absolutePosition += toCopy ; remaining -= toCopy ; } }
reads data from the front of the rolling buffer .
