public abstract class ToXContentToBytes extends Object implements ToXContent
ToXContent
implementation that also support conversion to BytesReference
for serialization purposesToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_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, wait
toXContent
protected 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 contentType
Copyright © 2009–2016. All rights reserved.