public int read(byte b[]) throws IOException, LogException {
  if (length < b.length)   badRead(b.length);
  int len=in.read(b);
  length-=len;
  return len;
}

public int read ( byte b [ ] ) throws IOException , LogException { if ( length < b . length ) badRead ( b . length ) ; int len = in . read ( b ) ; length -= len ; return len ; }
reads data into an array of bytes . this method blocks until some input is available .
