public int read() throws IOException {
  int b=in.read();
  if (b != -1) {
    cksum.update(b);
  }
  return b;
}

public int read ( ) throws IOException { int b = in . read ( ) ; if ( b != - 1 ) { cksum . update ( b ) ; } return b ; }
reads a byte . will block if no input is available .
