- All Superinterfaces:
AutoCloseable,Closeable,Releasable
- All Known Subinterfaces:
HttpBody.Full,HttpBody.Stream
- All Known Implementing Classes:
HttpBody.ByteRefHttpBody
A super-interface for different HTTP content implementations
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordstatic interfacestatic interfaceFull content represents a complete http body content that can be accessed immediately.static interfaceStream is a lazy-loaded content. -
Method Summary
Modifier and TypeMethodDescriptiondefault HttpBody.FullasFull()Assumes that HTTP body is a full content.default HttpBody.StreamasStream()Assumes that HTTP body is a lazy-stream.static HttpBody.Fullempty()static HttpBody.FullfromBytesReference(BytesReference bytesRef) default booleanisFull()default booleanisStream()Methods inherited from interface org.elasticsearch.core.Releasable
close
-
Method Details
-
fromBytesReference
-
empty
-
isFull
default boolean isFull() -
isStream
default boolean isStream() -
asFull
Assumes that HTTP body is a full content. If not sure, useisFull(). -
asStream
Assumes that HTTP body is a lazy-stream. If not sure, useisStream().
-