@Override public int read(byte[] b,int off,int len) throws IOException {
  if (closed) {
    throw new FileUploadException(ItemSkippedException);
  }
  if (len == 0) {
    return 0;
  }
  int res=available();
  if (res == 0) {
    res=makeAvailable();
    if (res == 0) {
      return -1;
    }
  }
  res=Math.min(res,len);
  System.arraycopy(buffer,head,b,off,res);
  head+=res;
  total+=res;
  return res;
}

@ Override public int read ( byte [ ] b , int off , int len ) throws IOException { if ( closed ) { throw new FileUploadException ( ItemSkippedException ) ; } if ( len == 0 ) { return 0 ; } int res = available ( ) ; if ( res == 0 ) { res = makeAvailable ( ) ; if ( res == 0 ) { return - 1 ; } } res = Math . min ( res , len ) ; System . arraycopy ( buffer , head , b , off , res ) ; head += res ; total += res ; return res ; }
reads bytes into the given buffer .
