SmileParser and SmileGenerator
instances; both of which handle
Smile encoded data.
Extends JsonFactory mostly so that users can actually use it in place
of regular non-Smile factory instances.
Note on using non-byte-based sources/targets (char based, like
java. and java.): these can not be
used for Smile-format documents, and thus will either downgrade to
textual JSON (when parsing), or throw exception (when trying to create
generator).
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | _cfgDelegateToTextual
Whether non-supported methods (ones trying to output using
char-based targets like |
| protected int | |
| protected int | |
| pack-priv static final int | DEFAULT_SMILE_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default. |
| pack-priv static final int | DEFAULT_SMILE_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default. |
| public static final String | FORMAT_NAME_SMILE
Name used to identify Smile format. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | SmileFactory(SmileFactory src, ObjectCodec oc)
Note REQUIRES 2.2.1 -- unfortunate intra-patch dep but seems preferable to just leaving bug be as is |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected JsonGenerator | _createGenerator(Writer
Writer underlying writer to write generated content to out, IOContext I/O context to use ctxt)Overrides com. Writer and context object.
|
| protected SmileGenerator | |
| protected SmileParser | _createParser(InputStream
InputStream to use for reading content to parse in, IOContext I/O context to use for parsing ctxt)Overrides com. |
| protected JsonParser | _createParser(Reader
Reader to use for reading content to parse r, IOContext I/O context to use for parsing ctxt)Overrides com. Reader object for reading content.
|
| protected JsonParser | _createParser(char[]
Buffer that contains content to parse data, int Offset to the first character of data to parse offset, int Number of characters within buffer to parse len, IOContext I/O context to use for parsing ctxt, boolean Whether input buffer is recycled by the factory recyclable)Overrides com. char[] object for accessing content.
|
| protected SmileParser | _createParser(byte[]
Buffer that contains content to parse data, int Offset to the first character of data to parse offset, int Number of characters within buffer to parse len, IOContext I/O context to use for parsing ctxt)Overrides com. Reader object for reading content
passed as raw byte array.
|
| protected JsonGenerator | _createUTF8Generator(OutputStream
OutputStream underlying writer to write generated content to out, IOContext I/O context to use ctxt)Overrides com. OutputStream and context object, using UTF-8 encoding.
|
| protected Writer | _createWriter(OutputStream out, JsonEncoding enc, IOContext ctxt)
Overrides com. |
| protected <T> T | |
| protected <T> T | |
| public static SmileFactoryBuilder | builder()
Hides com. SmileFactory instances with
different configuration.
|
| public boolean | canHandleBinaryNatively()
Overrides com. |
| public boolean | canParseAsync()
Overrides com. com..
|
| public boolean | canUseCharArrays()
Overrides com. char[] is something that actual
parser implementations can take advantage of, over having to
use java..
|
| public final SmileFactory | configure(SmileParser.
Method for enabling or disabling specified parser feature
(check |
| public final SmileFactory | configure(SmileGenerator.
Method for enabling or disabling specified generator feature
(check |
| public SmileFactory | copy()
Overrides com. JsonFactory that has
the same settings as this instance, but is otherwise
independent (i.e. nothing is actually shared, symbol tables
are separate).
|
| public SmileGenerator | createGenerator(OutputStream
OutputStream to use for writing JSON content out, JsonEncoding Character encoding to use enc)Overrides com. JsonGenerator for generating
Smile-encoded output.
|
| public SmileGenerator | createGenerator(OutputStream out)
Overrides com. JsonGenerator for generating
Smile-encoded output.
|
| public NonBlockingByteArrayParser | createNonBlockingByteArrayParser()
Overrides com. com.
interface (accessed using JsonParser#getNonBlockingInputFeeder()
from constructed instance).
|
| public SmileParser | createParser(File
File that contains JSON content to parse f)Overrides com. |
| public SmileParser | createParser(URL
URL pointing to resource that contains JSON content to parse url)Overrides com. |
| public SmileParser | createParser(InputStream
InputStream to use for reading JSON content to parse in)Overrides com. |
| public SmileParser | createParser(byte[] data)
Overrides com. |
| public SmileParser | createParser(byte[]
Buffer that contains data to parse data, int Offset of the first data byte within buffer offset, int Length of contents to parse within buffer len)Overrides com. |
| public void | |
| public SmileFactory | disable(SmileParser.
Method for disabling specified parser features
(check |
| public SmileFactory | disable(SmileGenerator.
Method for disabling specified generator feature
(check |
| public SmileFactory | enable(SmileParser.
Method for enabling specified parser feature
(check |
| public SmileFactory | enable(SmileGenerator.
Method for enabling specified generator features
(check |
| public int | |
| public String | getFormatName()
Overrides com. |
| public int | |
| public Class | getFormatReadFeatureType()
Overrides com. FormatFeature that a parser
JsonParser produced by this factory would accept, if any;
null returned if none.
|
| public Class | getFormatWriteFeatureType()
Overrides com. FormatFeature that a parser
JsonGenerator produced by this factory would accept, if any;
null returned if none.
|
| public MatchStrength | hasFormat(InputAccessor acc)
Sub-classes need to override this method (as of 1.8)
|
| public final boolean | |
| public final boolean | |
| protected Object | readResolve()
Overrides com. |
| public SmileFactoryBuilder | rebuild()
Method that allows construction of differently configured factory, starting
with settings of this factory.
|
| public Version | version()
Overrides com. Implements com. Version for details).
|