org.elasticsearch.common.xcontent
Interface XContent

All Known Implementing Classes:
JsonXContent, SmileXContent, YamlXContent

public interface XContent

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


Method Summary
 XContentGenerator createGenerator(OutputStream os)
          Creates a new generator using the provided output stream.
 XContentGenerator createGenerator(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(BytesReference bytes)
          Creates a parser over the provided bytes.
 XContentParser createParser(InputStream is)
          Creates a parser over the provided input stream.
 XContentParser createParser(Reader reader)
          Creates a parser over the provided reader.
 XContentParser createParser(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(OutputStream os)
                                  throws IOException
Creates a new generator using the provided output stream.

Throws:
IOException

createGenerator

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

Throws:
IOException

createParser

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

Throws:
IOException

createParser

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

Throws:
IOException

createParser

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

Throws:
IOException

createParser

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

Throws:
IOException

createParser

XContentParser createParser(BytesReference bytes)
                            throws IOException
Creates a parser over the provided bytes.

Throws:
IOException

createParser

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

Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.