code: public static InputStream cloneContent(InputStream source, long readbackSize, ByteArrayOutputStream target) throws IOException {
          return cloneContent(source, (int)Math.min((long)Integer.MAX_VALUE, readbackSize), target);
      }
docs: a convenience method to reduce all the casting of HttpEntity.getContentLength() to int