public int read() throws IOException {
  int val;
  if ((val=is.read()) < 0) {
    return -1;
  }
  if (bo == 'b') {
    val=(char)((val << 8) | (is.read() & 0xff));
  }
 else {
    val=(char)((is.read() << 8) | (val & 0xff));
  }
  return val;
}

public int read ( ) throws IOException { int val ; if ( ( val = is . read ( ) ) < 0 ) { return - 1 ; } if ( bo == 'b' ) { val = ( char ) ( ( val << 8 ) | ( is . read ( ) & 0xff ) ) ; } else { val = ( char ) ( ( is . read ( ) << 8 ) | ( val & 0xff ) ) ; } return val ; }
reads a single character .
