code: private void readMoreBytesFromStream() throws IOException {
          if (!innerStreamHasMoreData) {
              return;
          }
  
          int bufferSpaceAvailable = buffer.length - bytesInBuffer;
          if (bufferSpaceAvailable <= 0) {
              return;
          }
  
          int bytesRead =
                  stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);
  
          if (bytesRead == -1) {
              innerStreamHasMoreData = false;
          } else {
              bytesInBuffer += bytesRead;
          }
      }
docs: Fill the buffer with more data from the InputStream, if there is any.
  
  @throws IOException
  from the inner InputStream