public class JSONArrayWrappedRepeatableEntity extends RepeatableInputStreamEntity
Constructor and Description |
---|
JSONArrayWrappedRepeatableEntity(InputStream input,
org.apache.http.entity.ContentType contentType)
Creates a new RepeatableEntity instance.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getContent()
Returns the original InputStream, this input stream will be reset prior to being returned.
|
void |
writeTo(OutputStream outputStream)
Write the contents of the InputStream to the outputStream.
|
isRepeatable
close
consumeContent, getContentEncoding, getContentType, isChunked, setChunked, setContentEncoding, setContentEncoding, setContentType, setContentType, toString
public JSONArrayWrappedRepeatableEntity(InputStream input, org.apache.http.entity.ContentType contentType)
InputStream.reset()
will position the stream at the position it was in when passed to this
constructor.input
- the input stream (required to support mark/rest)contentType
- the content type of the input streampublic InputStream getContent() throws IOException
getContent
in interface org.apache.http.HttpEntity
getContent
in class RepeatableInputStreamEntity
IOException
public void writeTo(OutputStream outputStream) throws IOException
writeTo
in interface org.apache.http.HttpEntity
writeTo
in class RepeatableInputStreamEntity
outputStream
- the output stream to write entity content toIOException