public abstract class TokenStreamFactory extends java.lang.Object implements Versioned, java.io.Serializable
Constructor and Description |
---|
TokenStreamFactory() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canHandleBinaryNatively()
Introspection method that higher-level functionality may call
to see whether underlying data format can read and write binary
data natively; that is, embeded it as-is without using encodings
such as Base64.
|
abstract boolean |
canParseAsync()
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
NonBlockingInputFeeder . |
abstract boolean |
canUseSchema(FormatSchema schema)
Method that can be used to quickly check whether given schema
is something that parsers and/or generators constructed by this
factory could use.
|
abstract JsonGenerator |
createGenerator(java.io.DataOutput out) |
abstract JsonGenerator |
createGenerator(java.io.DataOutput out,
JsonEncoding enc) |
abstract JsonGenerator |
createGenerator(java.io.File f,
JsonEncoding enc) |
abstract JsonGenerator |
createGenerator(java.io.OutputStream out) |
abstract JsonGenerator |
createGenerator(java.io.OutputStream out,
JsonEncoding enc) |
abstract JsonGenerator |
createGenerator(java.io.Writer w) |
abstract JsonParser |
createNonBlockingByteArrayParser() |
abstract JsonParser |
createParser(byte[] data) |
abstract JsonParser |
createParser(byte[] data,
int offset,
int len) |
abstract JsonParser |
createParser(char[] content) |
abstract JsonParser |
createParser(char[] content,
int offset,
int len) |
abstract JsonParser |
createParser(java.io.DataInput in) |
abstract JsonParser |
createParser(java.io.File f) |
abstract JsonParser |
createParser(java.io.InputStream in) |
abstract JsonParser |
createParser(java.io.Reader r) |
abstract JsonParser |
createParser(java.lang.String content) |
abstract JsonParser |
createParser(java.net.URL url) |
abstract int |
getFormatGeneratorFeatures() |
abstract java.lang.String |
getFormatName()
Method that returns short textual id identifying format
this factory supports.
|
abstract int |
getFormatParserFeatures() |
abstract java.lang.Class<? extends FormatFeature> |
getFormatReadFeatureType()
Method for accessing kind of
FormatFeature that a parser
JsonParser produced by this factory would accept, if any;
null returned if none. |
abstract java.lang.Class<? extends FormatFeature> |
getFormatWriteFeatureType()
Method for accessing kind of
FormatFeature that a parser
JsonGenerator produced by this factory would accept, if any;
null returned if none. |
abstract int |
getGeneratorFeatures() |
abstract int |
getParserFeatures() |
abstract boolean |
isEnabled(JsonGenerator.Feature f) |
abstract boolean |
isEnabled(JsonParser.Feature f) |
abstract boolean |
requiresPropertyOrdering()
Introspection method that higher-level functionality may call
to see whether underlying data format requires a stable ordering
of object properties or not.
|
public abstract boolean requiresPropertyOrdering()
Default implementation returns false
as JSON does NOT
require stable ordering. Formats that require ordering include positional
textual formats like CSV
, and schema-based binary formats
like Avro
.
public abstract boolean canHandleBinaryNatively()
Default implementation returns false
as JSON does not
support native access: all binary content must use Base64 encoding.
Most binary formats (like Smile and Avro) support native binary content.
public abstract boolean canParseAsync()
NonBlockingInputFeeder
.public abstract java.lang.Class<? extends FormatFeature> getFormatReadFeatureType()
FormatFeature
that a parser
JsonParser
produced by this factory would accept, if any;
null
returned if none.public abstract java.lang.Class<? extends FormatFeature> getFormatWriteFeatureType()
FormatFeature
that a parser
JsonGenerator
produced by this factory would accept, if any;
null
returned if none.public abstract boolean canUseSchema(FormatSchema schema)
public abstract java.lang.String getFormatName()
public abstract boolean isEnabled(JsonParser.Feature f)
public abstract boolean isEnabled(JsonGenerator.Feature f)
public abstract int getParserFeatures()
public abstract int getGeneratorFeatures()
public abstract int getFormatParserFeatures()
public abstract int getFormatGeneratorFeatures()
public abstract JsonParser createParser(byte[] data) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(byte[] data, int offset, int len) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(char[] content) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(char[] content, int offset, int len) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.io.File f) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.io.Reader r) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.lang.String content) throws java.io.IOException
java.io.IOException
public abstract JsonParser createParser(java.net.URL url) throws java.io.IOException
java.io.IOException
public abstract JsonParser createNonBlockingByteArrayParser() throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.DataOutput out, JsonEncoding enc) throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.DataOutput out) throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.File f, JsonEncoding enc) throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.OutputStream out, JsonEncoding enc) throws java.io.IOException
java.io.IOException
public abstract JsonGenerator createGenerator(java.io.Writer w) throws java.io.IOException
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved