Class Apache5ContentEntity
java.lang.Object
org.apache.hc.core5.http.io.entity.AbstractHttpEntity
com.google.api.client.http.apache.v5.Apache5ContentEntity
- All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hc.core5.http.EntityDetails, org.apache.hc.core5.http.HttpEntity
final class Apache5ContentEntity
extends org.apache.hc.core5.http.io.entity.AbstractHttpEntity
Translation class to make google-http-client entity conform with Apache 5.x
AbstractHttpEntity-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longContent length or less than zero if not known.private final StreamingContentStreaming content. -
Constructor Summary
ConstructorsConstructorDescriptionApache5ContentEntity(long contentLength, StreamingContent streamingContent, String contentType, String contentEncoding) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()longbooleanbooleanvoidwriteTo(OutputStream out) Methods inherited from class org.apache.hc.core5.http.io.entity.AbstractHttpEntity
getContentEncoding, getContentType, getTrailerNames, getTrailers, isChunked, toString, writeTo
-
Field Details
-
contentLength
private final long contentLengthContent length or less than zero if not known. -
streamingContent
Streaming content.
-
-
Constructor Details
-
Apache5ContentEntity
Apache5ContentEntity(long contentLength, StreamingContent streamingContent, String contentType, String contentEncoding) - Parameters:
contentLength- content length or less than zero if not knownstreamingContent- streaming content
-
-
Method Details
-
getContent
-
getContentLength
public long getContentLength() -
isRepeatable
public boolean isRepeatable()- Specified by:
isRepeatablein interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
isRepeatablein classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity
-
isStreaming
public boolean isStreaming() -
writeTo
- Specified by:
writeToin interfaceorg.apache.hc.core5.http.HttpEntity- Overrides:
writeToin classorg.apache.hc.core5.http.io.entity.AbstractHttpEntity- Throws:
IOException
-
close
- Throws:
IOException
-