public abstract class ToXContentToBytes extends java.lang.Object implements ToXContent
ToXContent implementation that also support conversion to BytesReference for serialization purposesToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsEMPTY_PARAMS| Modifier | Constructor and Description |
|---|---|
protected |
ToXContentToBytes() |
protected |
ToXContentToBytes(XContentType defaultType) |
| Modifier and Type | Method and Description |
|---|---|
BytesReference |
buildAsBytes()
Returns a
BytesReference
containing the ToXContent output in binary format. |
BytesReference |
buildAsBytes(XContentType contentType)
Returns a
BytesReference
containing the ToXContent output in binary format. |
java.lang.String |
toString() |
java.lang.String |
toString(ToXContent.Params params) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisFragment, toXContentprotected ToXContentToBytes()
protected ToXContentToBytes(XContentType defaultType)
public final BytesReference buildAsBytes()
BytesReference
containing the ToXContent output in binary format.
Builds the request based on the default XContentType, either Requests.CONTENT_TYPE or provided as a constructor argumentpublic final BytesReference buildAsBytes(XContentType contentType)
BytesReference
containing the ToXContent output in binary format.
Builds the request as the provided contentTypepublic final java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.String toString(ToXContent.Params params)