|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.common.xcontent.XContentFactory
public class XContentFactory
A one stop to use XContent
and XContentBuilder
.
Constructor Summary | |
---|---|
XContentFactory()
|
Method Summary | |
---|---|
static XContentBuilder |
contentBuilder(XContentType type)
Returns a binary content builder for the provided content type. |
static XContentBuilder |
jsonBuilder()
Returns a content builder using JSON format ( XContentType.JSON . |
static XContentBuilder |
smileBuilder()
Returns a content builder using SMILE format ( XContentType.SMILE . |
static XContentBuilder |
unCachedContentBuilder(XContentType type)
Returns a binary content builder for the provided content type. |
static XContent |
xContent(byte[] data)
Guesses the content type based on the provided bytes. |
static XContent |
xContent(byte[] data,
int offset,
int length)
Guesses the content type based on the provided bytes. |
static XContent |
xContent(java.lang.CharSequence content)
Guesses the content (type) based on the provided char sequence. |
static XContent |
xContent(XContentType type)
Returns the XContent for the provided content type. |
static XContentType |
xContentType(byte[] data)
Guesses the content type based on the provided bytes. |
static XContentType |
xContentType(byte[] data,
int offset,
int length)
Guesses the content type based on the provided bytes. |
static XContentType |
xContentType(java.lang.CharSequence content)
Guesses the content type based on the provided char sequence. |
static XContentType |
xContentType(java.io.InputStream si)
Guesses the content type based on the provided input stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XContentFactory()
Method Detail |
---|
public static XContentBuilder jsonBuilder() throws java.io.IOException
XContentType.JSON
.
java.io.IOException
public static XContentBuilder smileBuilder() throws java.io.IOException
XContentType.SMILE
.
java.io.IOException
public static XContentBuilder contentBuilder(XContentType type) throws java.io.IOException
java.io.IOException
public static XContentBuilder unCachedContentBuilder(XContentType type) throws java.io.IOException
java.io.IOException
public static XContent xContent(XContentType type)
XContent
for the provided content type.
public static XContentType xContentType(java.lang.CharSequence content)
public static XContent xContent(java.lang.CharSequence content)
public static XContent xContent(byte[] data)
public static XContent xContent(byte[] data, int offset, int length)
public static XContentType xContentType(byte[] data)
public static XContentType xContentType(java.io.InputStream si) throws java.io.IOException
java.io.IOException
public static XContentType xContentType(byte[] data, int offset, int length)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |