@Override public int read() throws IOException {
synchronized (lock) {
    if (!isOpen()) {
      throw new IOException("InputStreamReader is closed");
    }
    char[] buf=new char[1];
    return read(buf,0,1) != -1 ? buf[0] : -1;
  }
}

@ Override public int read ( ) throws IOException { synchronized ( lock ) { if ( ! isOpen ( ) ) { throw new IOException ( "InputStreamReader is closed" ) ; } char [ ] buf = new char [ 1 ] ; return read ( buf , 0 , 1 ) != - 1 ? buf [ 0 ] : - 1 ; } }
reads a single character from this reader and returns it as an integer with the two higher - order bytes set to 0 . returns - 1 if the end of the reader has been reached . the byte value is either obtained from converting bytes in this reader ' s buffer or by first filling the buffer from the source inputstream and then reading from the buffer .
