Package com.attivio.util.stream
Class ResettableInputStreamRequestEntity
- java.lang.Object
-
- org.apache.http.entity.AbstractHttpEntity
-
- com.attivio.util.stream.ResettableInputStreamRequestEntity
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.http.HttpEntity
public final class ResettableInputStreamRequestEntity extends org.apache.http.entity.AbstractHttpEntity implements java.io.CloseableA RequestEntity that can be restarted by callingRestartableInputStream.restart().
-
-
Constructor Summary
Constructors Constructor Description ResettableInputStreamRequestEntity(InputStreamBuilder in, java.lang.String contentType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.io.InputStreamgetContent()longgetContentLength()booleanisRepeatable()booleanisStreaming()booleanisSuccessful()voidwriteTo(java.io.OutputStream out)
-
-
-
Constructor Detail
-
ResettableInputStreamRequestEntity
public ResettableInputStreamRequestEntity(InputStreamBuilder in, java.lang.String contentType) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOExceptionjava.lang.IllegalStateException
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
java.io.IOException
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
-