public abstract class ToXContentToBytes extends 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. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waittoXContentprotected 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 contentTypeCopyright © 2009–2017. All rights reserved.