TokenStreamFactory that will work on Ion content, instead of JSON
content.
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | _cfgBinaryWriters
Whether we will produce binary (true) or textual (false) Ion writers. |
| protected final IonSystem | |
| protected static final boolean | DEFAULT_CREATE_BINARY
Default setting for binary vs textual output: defaulting to textual. |
| protected static final int | DEFAULT_ION_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default. |
| protected static final int | DEFAULT_ION_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default. |
| public static final String | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected ContentReference | _createContentReference(Object contentRef)
Implements abstract tools. Overridable factory method for constructing |
| protected ContentReference | _createContentReference(Object contentRef, int offset, int length)
Implements abstract tools. Overridable factory method for constructing |
| protected IonGenerator | _createGenerator(ObjectWriteContext writeCtxt, OutputStream out, JsonEncoding enc, boolean isManaged)
|
| protected IonGenerator | _createGenerator(ObjectWriteContext writeCtxt, IOContext ioCtxt, IonWriter ion, boolean ionWriterIsManaged, Closeable dst)
|
| private JsonParser | |
| private JsonParser | |
| private JsonParser | _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, char[] data, int offset, int len, boolean recyclable)
|
| private JsonParser | |
| protected IonWriter | |
| public static IonFactoryBuilder | builderForBinaryWriters()
Method for creating |
| public static IonFactoryBuilder | builderForTextualWriters()
Method for creating |
| public boolean | canHandleBinaryNatively()
Implements abstract tools. Introspection method that higher-level functionality may call to see whether underlying data format can read and write binary data natively; that is, embedded it as-is without using encodings such as Base64. |
| public boolean | canParseAsync()
Implements abstract tools. Introspection method that can be used to check whether this
factory can create non-blocking parsers: parsers that do not
use blocking I/O abstractions but instead use a
|
| public boolean | canUseSchema(FormatSchema schema)
Implements abstract tools. Method that can be used to quickly check whether given schema is something that parsers and/or generators constructed by this factory could use. |
| public IonFactory | copy()
Implements abstract tools. Method similar to |
| public JsonGenerator | createGenerator(ObjectWriteContext writeCtxt, OutputStream out, JsonEncoding enc)
Implements abstract tools. Method for constructing generator that writes contents
using specified |
| public JsonGenerator | createGenerator(ObjectWriteContext writeCtxt, Writer w)
Implements abstract tools. Method for constructing generator that writes contents
using specified |
| public JsonGenerator | createGenerator(ObjectWriteContext writeCtxt, File f, JsonEncoding enc)
Implements abstract tools. Method for constructing generator that writes contents to specified file, overwriting contents it might have (or creating it if such file does not yet exist). |
| public JsonGenerator | createGenerator(ObjectWriteContext writeCtxt, Path p, JsonEncoding enc)
Implements abstract tools. Method for constructing generator that writes contents to specified path, overwriting contents it might have (or creating it if such path does not yet exist). |
| public IonGenerator | |
| public JsonParser | createParser(ObjectReadContext readCtxt, File f)
Implements abstract tools. Method for constructing parser instance to decode contents of specified file. |
| public JsonParser | createParser(ObjectReadContext readCtxt, Path p)
Implements abstract tools. Method for constructing parser instance to decode contents of specified path. |
| public JsonParser | createParser(ObjectReadContext readCtxt, InputStream in)
Implements abstract tools. Method for constructing JSON parser instance to parse the contents accessed via specified input stream. |
| public JsonParser | createParser(ObjectReadContext readCtxt, Reader r)
Implements abstract tools. Method for constructing parser for parsing the contents accessed via specified Reader. |
| public JsonParser | createParser(ObjectReadContext readCtxt, byte[] data)
Overrides tools. Method for constructing parser for parsing the contents of given byte array. |
| public JsonParser | createParser(ObjectReadContext readCtxt, byte[] data, int offset, int len)
Implements abstract tools. Method for constructing parser for parsing the contents of given byte array. |
| public JsonParser | createParser(ObjectReadContext readCtxt, String content)
Implements abstract tools. Method for constructing parser for parsing contents of given String. |
| public JsonParser | createParser(ObjectReadContext readCtxt, char[] content, int offset, int len)
Implements abstract tools. Method for constructing parser for parsing contents of given char array. |
| public JsonParser | createParser(ObjectReadContext readCtxt, DataInput in)
Implements abstract tools. Optional method for constructing parser for reading contents from specified |
| public IonParser | |
| public IonParser | |
| public static IonFactory | |
| public static IonFactory | |
| public String | getFormatName()
Implements abstract tools. Method that returns short textual id identifying format this factory supports. |
| public Class | getFormatReadFeatureType()
Overrides tools. Method for accessing kind of |
| public Class | getFormatWriteFeatureType()
Overrides tools. Method for accessing kind of |
| public IonSystem | |
| public final boolean | |
| public final boolean | |
| protected Object | readResolve()
Method that we need to override to actually make restoration go through constructors etc. |
| public IonFactoryBuilder | rebuild()
Implements abstract tools. Method that can be used to create differently configured stream factories: it will create and return a Builder instance with exact settings of this stream factory. |
| public TokenStreamFactory | snapshot()
Implements abstract tools. Implements tools. Instances are immutable so just return `this` |
| public Version | version()
Implements abstract tools. Implements tools. Method called to detect version of the component that implements this interface;
returned version should never be null, but may return specific "not available"
instance (see |
| _cfgBinaryWriters | back to summary |
|---|---|
| protected final boolean _cfgBinaryWriters Whether we will produce binary (true) or textual (false) Ion writers. | |
| _system | back to summary |
|---|---|
| protected final IonSystem _system | |
| DEFAULT_CREATE_BINARY | back to summary |
|---|---|
| protected static final boolean DEFAULT_CREATE_BINARY Default setting for binary vs textual output: defaulting to textual. | |
| DEFAULT_ION_GENERATOR_FEATURE_FLAGS | back to summary |
|---|---|
| protected static final int DEFAULT_ION_GENERATOR_FEATURE_FLAGS Bitfield (set of flags) of all generator features that are enabled by default. | |
| DEFAULT_ION_PARSER_FEATURE_FLAGS | back to summary |
|---|---|
| protected static final int DEFAULT_ION_PARSER_FEATURE_FLAGS Bitfield (set of flags) of all parser features that are enabled by default. | |
| FORMAT_NAME_ION | back to summary |
|---|---|
| public static final String FORMAT_NAME_ION | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| IonFactory | back to summary |
|---|---|
| public IonFactory() | |
| IonFactory | back to summary |
|---|---|
| protected IonFactory(IonFactory src) | |
| IonFactory | back to summary |
|---|---|
| protected IonFactory(IonFactoryBuilder b) Constructors used by
| |
| _createContentReference | back to summary |
|---|---|
| protected ContentReference _createContentReference(Object contentRef) Implements abstract tools. Doc from tools. Overridable factory method for constructing
| |
| _createContentReference | back to summary |
|---|---|
| protected ContentReference _createContentReference(Object contentRef, int offset, int length) Implements abstract tools. Doc from tools. Overridable factory method for constructing
| |
| _createGenerator | back to summary |
|---|---|
| protected IonGenerator _createGenerator(ObjectWriteContext writeCtxt, OutputStream out, JsonEncoding enc, boolean isManaged) | |
| _createGenerator | back to summary |
|---|---|
| protected IonGenerator _createGenerator(ObjectWriteContext writeCtxt, IOContext ioCtxt, IonWriter ion, boolean ionWriterIsManaged, Closeable dst) | |
| _createParser | back to summary |
|---|---|
| private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, InputStream in) | |
| _createParser | back to summary |
|---|---|
| private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, Reader r) | |
| _createParser | back to summary |
|---|---|
| private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, char[] data, int offset, int len, boolean recyclable) | |
| _createParser | back to summary |
|---|---|
| private JsonParser _createParser(ObjectReadContext readCtxt, IOContext ioCtxt, byte[] data, int offset, int len) | |
| _createTextualIonWriter | back to summary |
|---|---|
| protected IonWriter _createTextualIonWriter(ObjectWriteContext writeCtxt, Writer w) | |
| builderForBinaryWriters | back to summary |
|---|---|
| public static IonFactoryBuilder builderForBinaryWriters() Method for creating | |
| builderForTextualWriters | back to summary |
|---|---|
| public static IonFactoryBuilder builderForTextualWriters() Method for creating | |
| canHandleBinaryNatively | back to summary |
|---|---|
| public boolean canHandleBinaryNatively() Implements abstract tools. Doc from tools. Introspection method that higher-level functionality may call to see whether underlying data format can read and write binary data natively; that is, embedded it as-is without using encodings such as Base64.
| |
| canParseAsync | back to summary |
|---|---|
| public boolean canParseAsync() Implements abstract tools. Doc from tools. Introspection method that can be used to check whether this
factory can create non-blocking parsers: parsers that do not
use blocking I/O abstractions but instead use a
| |
| canUseSchema | back to summary |
|---|---|
| public boolean canUseSchema(FormatSchema schema) Implements abstract tools. Doc from tools. Method that can be used to quickly check whether given schema is something that parsers and/or generators constructed by this factory could use. Note that this means possible use, at the level of data format (i.e. schema is for same data format as parsers and generators this factory constructs); individual schema instances may have further usage restrictions.
| |
| copy | back to summary |
|---|---|
| public IonFactory copy() Implements abstract tools. Doc from tools. Method similar to Implementation should be functionally equivalent to:
factoryInstance.rebuild().build();
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(ObjectWriteContext writeCtxt, OutputStream out, JsonEncoding enc) Implements abstract tools. Doc from tools. Method for constructing generator that writes contents
using specified
Underlying stream is NOT owned by the generator constructed,
so that generator will NOT close the output stream when
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(ObjectWriteContext writeCtxt, Writer w) Implements abstract tools. Doc from tools. Method for constructing generator that writes contents
using specified
Underlying stream is NOT owned by the generator constructed,
so that generator will NOT close the Reader when
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(ObjectWriteContext writeCtxt, File f, JsonEncoding enc) Implements abstract tools. Doc from tools. Method for constructing generator that writes contents to specified file, overwriting contents it might have (or creating it if such file does not yet exist).
Underlying stream is owned by the generator constructed,
i.e. generator will handle closing of file when
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(ObjectWriteContext writeCtxt, Path p, JsonEncoding enc) throws JacksonException Implements abstract tools. Doc from tools. Method for constructing generator that writes contents to specified path, overwriting contents it might have (or creating it if such path does not yet exist).
Underlying stream is owned by the generator constructed,
i.e. generator will handle closing of path when
| |
| createGenerator | back to summary |
|---|---|
| public IonGenerator createGenerator(ObjectWriteContext writeCtxt, IonWriter out) | |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, File f) Implements abstract tools. Doc from tools. Method for constructing parser instance to decode contents of specified file.
Encoding is auto-detected from contents according to JSON
specification recommended mechanism. Json specification
supports only UTF-8, UTF-16 and UTF-32 as valid encodings,
so auto-detection implemented only for this charsets.
For other charsets use Underlying input stream (needed for reading contents) will be owned (and managed, i.e. closed as need be) by the parser, since caller has no access to it.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, Path p) throws JacksonException Implements abstract tools. Doc from tools. Method for constructing parser instance to decode contents of specified path.
Encoding is auto-detected from contents according to JSON
specification recommended mechanism. Json specification
supports only UTF-8, UTF-16 and UTF-32 as valid encodings,
so auto-detection implemented only for this charsets.
For other charsets use Underlying input stream (needed for reading contents) will be owned (and managed, i.e. closed as need be) by the parser, since caller has no access to it.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, InputStream in) Implements abstract tools. Doc from tools. Method for constructing JSON parser instance to parse the contents accessed via specified input stream.
The input stream will not be owned by
the parser, it will still be managed (i.e. closed if
end-of-stream is reacher, or parser close method called)
if (and only if) Note no encoding argument is taken since it can always be
auto-detected as suggested by JSON RFC. Json specification
supports only UTF-8, UTF-16 and UTF-32 as valid encodings,
so auto-detection implemented only for this charsets.
For other charsets use
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, Reader r) Implements abstract tools. Doc from tools. Method for constructing parser for parsing the contents accessed via specified Reader.
The read stream will not be owned by
the parser, it will still be managed (i.e. closed if
end-of-stream is reacher, or parser close method called)
if (and only if)
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, byte[] data) Overrides tools. Doc from tools. Method for constructing parser for parsing the contents of given byte array.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, byte[] data, int offset, int len) Implements abstract tools. Doc from tools. Method for constructing parser for parsing the contents of given byte array.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, String content) Implements abstract tools. Doc from tools. Method for constructing parser for parsing contents of given String.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, char[] content, int offset, int len) Implements abstract tools. Doc from tools. Method for constructing parser for parsing contents of given char array.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, DataInput in) Implements abstract tools. Doc from tools. Optional method for constructing parser for reading contents from specified
If this factory does not support
| |
| createParser | back to summary |
|---|---|
| public IonParser createParser(ObjectReadContext readCtxt, IonReader in) | |
| createParser | back to summary |
|---|---|
| public IonParser createParser(ObjectReadContext readCtxt, IonValue value) | |
| forBinaryWriters | back to summary |
|---|---|
| public static IonFactory forBinaryWriters() Method for creating | |
| forTextualWriters | back to summary |
|---|---|
| public static IonFactory forTextualWriters() Method for creating | |
| getFormatName | back to summary |
|---|---|
| public String getFormatName() Implements abstract tools. Doc from tools. Method that returns short textual id identifying format this factory supports.
| |
| getFormatReadFeatureType | back to summary |
|---|---|
| public Class Overrides tools. Doc from tools. Method for accessing kind of
| |
| getFormatWriteFeatureType | back to summary |
|---|---|
| public Class Overrides tools. Doc from tools. Method for accessing kind of
| |
| getIonSystem | back to summary |
|---|---|
| public IonSystem getIonSystem() | |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled(IonReadFeature f) Checked whether specified parser feature is enabled. | |
| isEnabled | back to summary |
|---|---|
| public final boolean isEnabled(IonWriteFeature f) Check whether specified generator feature is enabled. | |
| readResolve | back to summary |
|---|---|
| protected Object readResolve() Method that we need to override to actually make restoration go through constructors etc. | |
| rebuild | back to summary |
|---|---|
| public IonFactoryBuilder rebuild() Implements abstract tools. Doc from tools. Method that can be used to create differently configured stream factories: it will create and return a Builder instance with exact settings of this stream factory.
| |
| snapshot | back to summary |
|---|---|
| public TokenStreamFactory snapshot() Implements abstract tools. Implements tools. Instances are immutable so just return `this`
| |
| version | back to summary |
|---|---|
| public Version version() Implements abstract tools. Implements tools. Doc from tools. Method called to detect version of the component that implements this interface;
returned version should never be null, but may return specific "not available"
instance (see
| |