code: @Override
    public int read() throws IOException {
      try {
        beforeRead(1);
        int c = in.read();
        afterRead(c != -1 ? 1 : -1);
        return c;
      } catch (IOException e) {
        handleIOException(e);
        return -1;
      }
    }
docs: Invokes the delegate's <code>read()</code> method.
  @return the character read or -1 if the end of stream
  @throws IOException if an I/O error occurs