| Constructor: |
public InputStreamRequestEntity(InputStream content) {
this(content, null);
}
Creates a new InputStreamRequestEntity with the given content and a content type of
#CONTENT_LENGTH_AUTO . Parameters:
content - The content to set.
|
public InputStreamRequestEntity(InputStream content,
String contentType) {
this(content, CONTENT_LENGTH_AUTO, contentType);
}
Creates a new InputStreamRequestEntity with the given content, content type, and a
content length of #CONTENT_LENGTH_AUTO . Parameters:
content - The content to set.
contentType - The type of the content, or null.
|
public InputStreamRequestEntity(InputStream content,
long contentLength) {
this(content, contentLength, null);
}
Creates a new InputStreamRequestEntity with the given content and content length. Parameters:
content - The content to set.
contentLength - The content size in bytes or a negative number if not known.
If #CONTENT_LENGTH_AUTO is given the content will be buffered in order to
determine its size when #getContentLength() is called.
|
public InputStreamRequestEntity(InputStream content,
long contentLength,
String contentType) {
if (content == null) {
throw new IllegalArgumentException("The content cannot be null");
}
this.content = content;
this.contentLength = contentLength;
this.contentType = contentType;
}
Creates a new InputStreamRequestEntity with the given content, content length, and
content type. Parameters:
content - The content to set.
contentLength - The content size in bytes or a negative number if not known.
If #CONTENT_LENGTH_AUTO is given the content will be buffered in order to
determine its size when #getContentLength() is called.
contentType - The type of the content, or null.
|