TokenStreamFactory sub-class used as the base for
textual data formats.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | TextualTSFactory(StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int formatPF, int formatGF)
|
| protected | TextualTSFactory(DecorableTSFactory.
Builder with configurations to use baseBuilderConstructors used by builders for instantiation. |
| 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 abstract JsonGenerator | Returns: Generator constructedObject write context for generator to use writeCtxt, IOContext IOContext for generator to use ioCtxt, Writer Writer for generator to use out)Overridable factory method that actually instantiates generator for
given |
| protected abstract JsonParser | |
| protected abstract JsonParser | |
| protected abstract JsonParser | |
| protected abstract JsonParser | _createParser(ObjectReadContext readCtxt, IOContext ctxt, char[] data, int offset, int len, boolean recyclable)
|
| protected abstract JsonParser | |
| protected abstract JsonGenerator | Returns: Generator constructedObject write context for generator to use writeCtxt, IOContext IOContext for generator to use ioCtxt, OutputStream OutputStream for generator to use out)Overridable factory method that actually instantiates generator for
given |
| protected Writer | |
| 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 | Returns: Whether efficient access is possibleIntrospection method that can be used by base factory to check
whether access using |
| 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 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, 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 |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides tools. | |
| TextualTSFactory | back to summary |
|---|---|
| protected TextualTSFactory(StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int formatPF, int formatGF) | |
| TextualTSFactory | back to summary |
|---|---|
| protected TextualTSFactory(DecorableTSFactory. Constructors used by builders for instantiation.
| |
| TextualTSFactory | back to summary |
|---|---|
| protected TextualTSFactory(TextualTSFactory src) | |
| _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 abstract JsonGenerator _createGenerator(ObjectWriteContext writeCtxt, IOContext ioCtxt, Writer out) throws JacksonException Overridable factory method that actually instantiates generator for
given This method is specifically designed to remain compatible between minor versions so that sub-classes can count on it being called as expected. That is, it is part of official interface from sub-class perspective, although not a public method available to users of factory implementations.
| |
| _createParser | back to summary |
|---|---|
| protected abstract JsonParser _createParser(ObjectReadContext readCtxt, IOContext ctxt, InputStream in) throws JacksonException | |
| _createParser | back to summary |
|---|---|
| protected abstract JsonParser _createParser(ObjectReadContext readCtxt, IOContext ctxt, Reader r) throws JacksonException | |
| _createParser | back to summary |
|---|---|
| protected abstract JsonParser _createParser(ObjectReadContext readCtxt, IOContext ctxt, byte[] data, int offset, int len) throws JacksonException | |
| _createParser | back to summary |
|---|---|
| protected abstract JsonParser _createParser(ObjectReadContext readCtxt, IOContext ctxt, char[] data, int offset, int len, boolean recyclable) throws JacksonException | |
| _createParser | back to summary |
|---|---|
| protected abstract JsonParser _createParser(ObjectReadContext readCtxt, IOContext ctxt, DataInput input) throws JacksonException | |
| _createUTF8Generator | back to summary |
|---|---|
| protected abstract JsonGenerator _createUTF8Generator(ObjectWriteContext writeCtxt, IOContext ioCtxt, OutputStream out) throws JacksonException Overridable factory method that actually instantiates generator for
given This method is specifically designed to remain compatible between minor versions so that sub-classes can count on it being called as expected. That is, it is part of official interface from sub-class perspective, although not a public method available to users of factory implementations.
| |
| _createWriter | back to summary |
|---|---|
| protected Writer _createWriter(IOContext ioCtxt, OutputStream out, JsonEncoding enc) throws JacksonException | |
| 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.
| |
| canUseCharArrays | back to summary |
|---|---|
| public boolean canUseCharArrays() Introspection method that can be used by base factory to check
whether access using
Default implementation simply returns
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(ObjectWriteContext writeCtxt, OutputStream out, JsonEncoding enc) throws JacksonException 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) throws JacksonException 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) throws JacksonException 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
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(ObjectReadContext readCtxt, File f) throws JacksonException 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) throws JacksonException 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) throws JacksonException 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, int offset, int len) throws JacksonException 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) throws JacksonException 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) throws JacksonException 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) throws JacksonException Implements abstract tools. Doc from tools. Optional method for constructing parser for reading contents from specified
If this factory does not support
| |