private BufferExposingByteArrayOutputStream doReadBytes(@Nullable ProgressIndicator indicator) throws IOException {
      long contentLength = getConnection().getContentLengthLong();
      if (contentLength > Integer.MAX_VALUE) throw new IOException("Cannot download more than 2 GiB; content length is " + contentLength);
      BufferExposingByteArrayOutputStream out = new BufferExposingByteArrayOutputStream(contentLength > 0 ? (int)contentLength : 16384);
      NetUtils.copyStreamContent(indicator, getInputStream(), out, contentLength, false);
      return out;
    }
private BufferExposingByteArrayOutputStream doReadBytes(@Nullable ProgressIndicator indicator)