docs: public int read() throws IOException {
  
          if (closed) {
              throw new IOException("Attempted read from closed stream.");
          }
          if (eof) {
              return -1;
          }
          if (pos >= chunkSize) {
              nextChunk();
              if (eof) {
                  return -1;
              }
          }
          pos++;
          return in.read();
      }