Package com.oracle.bmc.http.internal
Class ApacheInputStreamEntity
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.oracle.bmc.http.internal.ApacheInputStreamEntity
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.http.HttpEntity
public class ApacheInputStreamEntity extends FilterInputStream implements org.apache.http.HttpEntity
Class for ApacheInputStream.Apache connector in Jersey v2.32 supports passing an HttpEntity as the body. In this case Apache connector will not read entire data into memory. Content length is a must to use this conversion.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ApacheInputStreamEntity(InputStream in, Long contentLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconsumeContent()InputStreamgetContent()org.apache.http.HeadergetContentEncoding()longgetContentLength()org.apache.http.HeadergetContentType()booleanisChunked()booleanisRepeatable()booleanisStreaming()voidwriteTo(OutputStream outputStream)-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ApacheInputStreamEntity
public ApacheInputStreamEntity(InputStream in, Long contentLength)
-
-
Method Detail
-
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatablein interfaceorg.apache.http.HttpEntity
-
isChunked
public boolean isChunked()
- Specified by:
isChunkedin interfaceorg.apache.http.HttpEntity
-
getContentLength
public long getContentLength()
- Specified by:
getContentLengthin interfaceorg.apache.http.HttpEntity
-
getContentType
public org.apache.http.Header getContentType()
- Specified by:
getContentTypein interfaceorg.apache.http.HttpEntity
-
getContentEncoding
public org.apache.http.Header getContentEncoding()
- Specified by:
getContentEncodingin interfaceorg.apache.http.HttpEntity
-
getContent
public InputStream getContent() throws IOException, UnsupportedOperationException
- Specified by:
getContentin interfaceorg.apache.http.HttpEntity- Throws:
IOExceptionUnsupportedOperationException
-
writeTo
public void writeTo(OutputStream outputStream) throws IOException
- Specified by:
writeToin interfaceorg.apache.http.HttpEntity- Throws:
IOException
-
isStreaming
public boolean isStreaming()
- Specified by:
isStreamingin interfaceorg.apache.http.HttpEntity
-
consumeContent
public void consumeContent() throws IOException- Specified by:
consumeContentin interfaceorg.apache.http.HttpEntity- Throws:
IOException
-
-