org.elasticsearch.common.xcontent
Interface XContent

All Known Implementing Classes:
JsonXContent, SmileXContent

public interface XContent

A generic abstraction on top of handling content, inspired by JSON and pull parsing.


Method Summary
 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.
 

Method Detail

type

XContentType type()
The type this content handles and produces.


streamSeparator

byte streamSeparator()

createGenerator

XContentGenerator createGenerator(java.io.OutputStream os)
                                  throws java.io.IOException
Creates a new generator using the provided output stream.

Throws:
java.io.IOException

createGenerator

XContentGenerator createGenerator(java.io.Writer writer)
                                  throws java.io.IOException
Creates a new generator using the provided writer.

Throws:
java.io.IOException

createParser

XContentParser createParser(java.lang.String content)
                            throws java.io.IOException
Creates a parser over the provided string content.

Throws:
java.io.IOException

createParser

XContentParser createParser(java.io.InputStream is)
                            throws java.io.IOException
Creates a parser over the provided input stream.

Throws:
java.io.IOException

createParser

XContentParser createParser(byte[] data)
                            throws java.io.IOException
Creates a parser over the provided bytes.

Throws:
java.io.IOException

createParser

XContentParser createParser(byte[] data,
                            int offset,
                            int length)
                            throws java.io.IOException
Creates a parser over the provided bytes.

Throws:
java.io.IOException

createParser

XContentParser createParser(java.io.Reader reader)
                            throws java.io.IOException
Creates a parser over the provided reader.

Throws:
java.io.IOException