code: @Override
      public int read() throws IOException {
          if (this.closed) {
              throw new IOException("Attempted read from closed stream.");
          }
          if (this.eof) {
              return -1;
          }
          if (state != CHUNK_DATA) {
              nextChunk();
              if (this.eof) {
                  return -1;
              }
          }
          final int b = in.read();
          if (b != -1) {
              pos++;
              if (pos >= chunkSize) {
                  state = CHUNK_CRLF;
              }
          }
          return b;
      }
docs: <p> Returns all the data in a chunked stream in coalesced form. A chunk
  is followed by a CRLF. The method returns -1 as soon as a chunksize of 0
  is detected.</p>
  
  <p> Trailer headers are read automatically at the end of the stream and
  can be obtained with the getResponseFooters() method.</p>
  
  @return -1 of the end of the stream has been reached or the next data
  byte
  @throws IOException in case of an I/O error