code: @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;
          }
      }
docs: 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.
  
  @return the character read or -1 if the end of the reader has been
  reached.
  @throws IOException
  if this reader is closed or some other I/O error occurs.