docs: @Override
      public int read(byte[] bts) throws IOException {
          try {
              beforeRead(bts != null ? bts.length : 0);
              int n = in.read(bts);
              afterRead(n);
              return n;
          } catch (IOException e) {
              handleIOException(e);
              return -1;
          }
      }