org.elasticsearch.common.xcontent.json
Class JsonXContent

java.lang.Object
  extended by org.elasticsearch.common.xcontent.json.JsonXContent
All Implemented Interfaces:
XContent

public class JsonXContent
extends java.lang.Object
implements XContent

A JSON based content implementation using Jackson.


Field Summary
static JsonXContent jsonXContent
           
 
Method Summary
static XContentBuilder contentBuilder()
           
 XContentGenerator createGenerator(java.io.OutputStream os)
          Creates a new generator using the provided output stream.
 XContentGenerator createGenerator(java.io.Writer writer)
          Creates a new generator using the provided writer.
 XContentParser createParser(byte[] data)
          Creates a parser over the provided bytes.
 XContentParser createParser(byte[] data, int offset, int length)
          Creates a parser over the provided bytes.
 XContentParser createParser(java.io.InputStream is)
          Creates a parser over the provided input stream.
 XContentParser createParser(java.io.Reader reader)
          Creates a parser over the provided reader.
 XContentParser createParser(java.lang.String content)
          Creates a parser over the provided string content.
 byte streamSeparator()
           
 XContentType type()
          The type this content handles and produces.
static XContentBuilder unCachedContentBuilder()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jsonXContent

public static final JsonXContent jsonXContent
Method Detail

contentBuilder

public static XContentBuilder contentBuilder()
                                      throws java.io.IOException
Throws:
java.io.IOException

unCachedContentBuilder

public static XContentBuilder unCachedContentBuilder()
                                              throws java.io.IOException
Throws:
java.io.IOException

type

public XContentType type()
Description copied from interface: XContent
The type this content handles and produces.

Specified by:
type in interface XContent

streamSeparator

public byte streamSeparator()
Specified by:
streamSeparator in interface XContent

createGenerator

public XContentGenerator createGenerator(java.io.OutputStream os)
                                  throws java.io.IOException
Description copied from interface: XContent
Creates a new generator using the provided output stream.

Specified by:
createGenerator in interface XContent
Throws:
java.io.IOException

createGenerator

public XContentGenerator createGenerator(java.io.Writer writer)
                                  throws java.io.IOException
Description copied from interface: XContent
Creates a new generator using the provided writer.

Specified by:
createGenerator in interface XContent
Throws:
java.io.IOException

createParser

public XContentParser createParser(java.lang.String content)
                            throws java.io.IOException
Description copied from interface: XContent
Creates a parser over the provided string content.

Specified by:
createParser in interface XContent
Throws:
java.io.IOException

createParser

public XContentParser createParser(java.io.InputStream is)
                            throws java.io.IOException
Description copied from interface: XContent
Creates a parser over the provided input stream.

Specified by:
createParser in interface XContent
Throws:
java.io.IOException

createParser

public XContentParser createParser(byte[] data)
                            throws java.io.IOException
Description copied from interface: XContent
Creates a parser over the provided bytes.

Specified by:
createParser in interface XContent
Throws:
java.io.IOException

createParser

public XContentParser createParser(byte[] data,
                                   int offset,
                                   int length)
                            throws java.io.IOException
Description copied from interface: XContent
Creates a parser over the provided bytes.

Specified by:
createParser in interface XContent
Throws:
java.io.IOException

createParser

public XContentParser createParser(java.io.Reader reader)
                            throws java.io.IOException
Description copied from interface: XContent
Creates a parser over the provided reader.

Specified by:
createParser in interface XContent
Throws:
java.io.IOException