code: public void readAll(InputStream in) throws IOException {
      int read = 0;
      do {
        grow(length);
        read = data.setBytes(length, in, data.length() - length);
        if (read > 0) {
          length += read;
        }
      } while (in.available() > 0);
    }
docs: Read the entire stream into this array.
  @param in the stream to read from
  @throws IOException