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.Closeable
A 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 void
close()
java.io.InputStream
getContent()
long
getContentLength()
boolean
isRepeatable()
boolean
isStreaming()
boolean
isSuccessful()
void
writeTo(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:
getContentLength
in interfaceorg.apache.http.HttpEntity
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatable
in interfaceorg.apache.http.HttpEntity
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
getContent
public java.io.InputStream getContent() throws java.io.IOException, java.lang.IllegalStateException
- Specified by:
getContent
in interfaceorg.apache.http.HttpEntity
- Throws:
java.io.IOException
java.lang.IllegalStateException
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
- Specified by:
writeTo
in interfaceorg.apache.http.HttpEntity
- Throws:
java.io.IOException
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreaming
in interfaceorg.apache.http.HttpEntity
-
-