@Override public int read() throws IOException {
  int b0=fInputStream.read() & 0xff;
  if (b0 == 0xff) {
    return -1;
  }
  int b1=fInputStream.read() & 0xff;
  if (b1 == 0xff) {
    return -1;
  }
  if (fEncoding >= 4) {
    int b2=fInputStream.read() & 0xff;
    if (b2 == 0xff) {
      return -1;
    }
    int b3=fInputStream.read() & 0xff;
    if (b3 == 0xff) {
      return -1;
    }
    if (fEncoding == UCS4BE) {
      return (b0 << 24) + (b1 << 16) + (b2 << 8)+ b3;
    }
    return (b3 << 24) + (b2 << 16) + (b1 << 8)+ b0;
  }
  if (fEncoding == UCS2BE) {
    return (b0 << 8) + b1;
  }
  return (b1 << 8) + b0;
}

@ Override public int read ( ) throws IOException { int b0 = fInputStream . read ( ) & 0xff ; if ( b0 == 0xff ) { return - 1 ; } int b1 = fInputStream . read ( ) & 0xff ; if ( b1 == 0xff ) { return - 1 ; } if ( fEncoding >= 4 ) { int b2 = fInputStream . read ( ) & 0xff ; if ( b2 == 0xff ) { return - 1 ; } int b3 = fInputStream . read ( ) & 0xff ; if ( b3 == 0xff ) { return - 1 ; } if ( fEncoding == UCS4BE ) { return ( b0 << 24 ) + ( b1 << 16 ) + ( b2 << 8 ) + b3 ; } return ( b3 << 24 ) + ( b2 << 16 ) + ( b1 << 8 ) + b0 ; } if ( fEncoding == UCS2BE ) { return ( b0 << 8 ) + b1 ; } return ( b1 << 8 ) + b0 ; }
read a single character . this method will block until a character is available , an i / o error occurs , or the end of the stream is reached . < p / > < p > subclasses that intend to support efficient single - character input should override this method .
