public class NonClosingInputStreamEntity
extends AbstractHttpEntity
Modifier and Type | Field and Description |
---|---|
private static int |
BUFFER_SIZE |
private java.io.InputStream |
content |
private long |
length |
Constructor and Description |
---|
NonClosingInputStreamEntity(java.io.InputStream instream,
long length) |
Modifier and Type | Method and Description |
---|---|
void |
consumeContent()
Deprecated.
Either use
getContent() and call InputStream.close() on that;
otherwise call writeTo(OutputStream) which is required to free the resources. |
java.io.InputStream |
getContent() |
long |
getContentLength() |
boolean |
isRepeatable() |
boolean |
isStreaming() |
void |
writeTo(java.io.OutputStream outstream) |
private static final int BUFFER_SIZE
private final java.io.InputStream content
private final long length
public NonClosingInputStreamEntity(java.io.InputStream instream, long length)
public boolean isRepeatable()
public long getContentLength()
public java.io.InputStream getContent() throws java.io.IOException
java.io.IOException
public void writeTo(java.io.OutputStream outstream) throws java.io.IOException
java.io.IOException
public boolean isStreaming()
@Deprecated public void consumeContent() throws java.io.IOException
getContent()
and call InputStream.close()
on that;
otherwise call writeTo(OutputStream)
which is required to free the resources.java.io.IOException