int readResults(final byte[] b,final int bPos,final int bAvail,final Context context){
  if (context.buffer != null) {
    final int len=Math.min(available(context),bAvail);
    System.arraycopy(context.buffer,context.readPos,b,bPos,len);
    context.readPos+=len;
    if (context.readPos >= context.pos) {
      context.buffer=null;
    }
    return len;
  }
  return context.eof ? EOF : 0;
}

int readResults ( final byte [ ] b , final int bPos , final int bAvail , final Context context ) { if ( context . buffer != null ) { final int len = Math . min ( available ( context ) , bAvail ) ; System . arraycopy ( context . buffer , context . readPos , b , bPos , len ) ; context . readPos += len ; if ( context . readPos >= context . pos ) { context . buffer = null ; } return len ; } return context . eof ? EOF : 0 ; }
extracts buffered data into the provided byte [ ] array , starting at position bpos , up to a maximum of bavail bytes . returns how many bytes were actually extracted . < p > package protected for access from i / o streams .
