docs: @Override
      public int read() throws IOException {
          try {
              beforeRead(1);
              int b = in.read();
              afterRead(b != -1 ? 1 : -1);
              return b;
          } catch (IOException e) {
              handleIOException(e);
              return -1;
          }
      }