| Modifier and Type | Field and Description |
|---|---|
| protected static final String | |
| public static final String | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| protected | |
| protected | JavaPropsFactory(JavaPropsFactoryBuilder b)
Constructors used by |
| 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. Overridable factory method that actually instantiates generator for
given |
| private final JsonGenerator | |
| protected JsonParser | _createParser(InputStream
InputStream to use for reading content to parse in, IOContext I/O context to use for parsing ctxt)Overrides com. Overridable factory method that actually instantiates desired parser
given |
| protected JsonParser | _createParser(Reader
Reader to use for reading content to parse r, IOContext I/O context to use for parsing ctxt)Overrides com. Overridable factory method that actually instantiates parser
using given |
| 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. Overridable factory method that actually instantiates parser
using given |
| protected JsonParser | _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. Overridable factory method that actually instantiates parser
using given |
| protected JsonGenerator | _createUTF8Generator(OutputStream
OutputStream underlying writer to write generated content to out, IOContext I/O context to use ctxt)Overrides com. Overridable factory method that actually instantiates generator for
given |
| protected Writer | _createWriter(OutputStream out, JsonEncoding enc, IOContext ctxt)
Overrides com.
|
| protected Properties | |
| protected Properties | |
| protected <T> T | |
| public static JavaPropsFactoryBuilder | builder()
Hides com. Main factory method to use for constructing |
| public boolean | canHandleBinaryNatively()
Overrides com. 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. |
| public boolean | canUseCharArrays()
Overrides com. Introspection method that can be used by base factory to check
whether access using |
| public boolean | canUseSchema(FormatSchema
Schema instance to check schema)Overrides com. 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 JavaPropsFactory | copy()
Overrides com. Method for constructing a new |
| public JavaPropsGenerator | |
| public JavaPropsGenerator | createGenerator(Map<?, ?> target, JavaPropsSchema schema)
Convenience method to allow using a pre-constructed |
| public JsonGenerator | createGenerator(OutputStream
OutputStream to use for writing JSON content out, JsonEncoding Character encoding to use enc)Overrides com. Method for constructing JSON generator for writing JSON content using specified output stream. |
| public JsonGenerator | createGenerator(OutputStream out)
Overrides com. Method for constructing |
| public JavaPropsParser | createParser(Map<?, ?> content)
Convenience method to allow feeding a pre-parsed |
| public JavaPropsParser | |
| public JsonParser | createParser(File
File that contains JSON content to parse f)Overrides com. Method for constructing JSON parser instance to parse contents of specified file. |
| public JsonParser | createParser(URL
URL pointing to resource that contains JSON content to parse url)Overrides com. Method for constructing JSON parser instance to parse contents of resource reference by given URL. |
| public JsonParser | createParser(InputStream
InputStream to use for reading JSON content to parse in)Overrides com. Method for constructing JSON parser instance to parse the contents accessed via specified input stream. |
| public JsonParser | createParser(byte[] data)
Overrides com. Method for constructing parser for parsing the contents of given byte array. |
| public JsonParser | 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. Method for constructing parser for parsing the contents of given byte array. |
| public String | getFormatName()
Overrides com. Method that returns short textual id identifying format this factory supports. |
| public MatchStrength | hasFormat(InputAccessor acc)
Overrides com. Sub-classes need to override this method |
| public JavaPropsFactoryBuilder | rebuild()
Overrides com. Method that allows construction of differently configured factory, starting with settings of this factory. |
| public boolean | requiresPropertyOrdering()
Overrides com. Introspection method that higher-level functionality may call to see whether underlying data format requires a stable ordering of object properties or not. |
| public Version | version()
Overrides com. Implements com. 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 |
| CHARSET_ID_LATIN1 | back to summary |
|---|---|
| protected static final String CHARSET_ID_LATIN1 | |
| FORMAT_NAME_JAVA_PROPERTIES | back to summary |
|---|---|
| public static final String FORMAT_NAME_JAVA_PROPERTIES | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides com. | |
| JavaPropsFactory | back to summary |
|---|---|
| public JavaPropsFactory() | |
| JavaPropsFactory | back to summary |
|---|---|
| public JavaPropsFactory(ObjectCodec codec) | |
| JavaPropsFactory | back to summary |
|---|---|
| protected JavaPropsFactory(JavaPropsFactory src, ObjectCodec oc) | |
| JavaPropsFactory | back to summary |
|---|---|
| protected JavaPropsFactory(JavaPropsFactoryBuilder b) Constructors used by
| |
| _createGenerator | back to summary |
|---|---|
| protected JsonGenerator _createGenerator(Writer out, IOContext ctxt) throws IOException Overrides com. Doc from com. 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.
| |
| _createJavaPropsGenerator | back to summary |
|---|---|
| private final JsonGenerator _createJavaPropsGenerator(IOContext ctxt, int stdFeat, ObjectCodec codec, OutputStream out) throws IOException | |
| _createParser | back to summary |
|---|---|
| protected JsonParser _createParser(InputStream in, IOContext ctxt) throws IOException Overrides com. Doc from com. Overridable factory method that actually instantiates desired parser
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 JsonParser _createParser(Reader r, IOContext ctxt) throws IOException Overrides com. Doc from com. Overridable factory method that actually instantiates parser
using 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 JsonParser _createParser(char[] data, int offset, int len, IOContext ctxt, boolean recyclable) throws IOException Overrides com. Doc from com. Overridable factory method that actually instantiates parser
using given
| |
| _createParser | back to summary |
|---|---|
| protected JsonParser _createParser(byte[] data, int offset, int len, IOContext ctxt) throws IOException Overrides com. Doc from com. Overridable factory method that actually instantiates parser
using 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.
| |
| _createUTF8Generator | back to summary |
|---|---|
| protected JsonGenerator _createUTF8Generator(OutputStream out, IOContext ctxt) throws IOException Overrides com. Doc from com. 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(OutputStream out, JsonEncoding enc, IOContext ctxt) throws IOException Overrides com.
| |
| _loadProperties | back to summary |
|---|---|
| protected Properties _loadProperties(InputStream in, IOContext ctxt) throws IOException | |
| _loadProperties | back to summary |
|---|---|
| protected Properties _loadProperties(Reader r0, IOContext ctxt) throws IOException | |
| _reportReadException | back to summary |
|---|---|
| protected <T> T _reportReadException(String msg, Exception rootCause) throws IOException | |
| builder | back to summary |
|---|---|
| public static JavaPropsFactoryBuilder builder() Hides com. Main factory method to use for constructing
| |
| canHandleBinaryNatively | back to summary |
|---|---|
| public boolean canHandleBinaryNatively() Overrides com. Doc from com. 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.
Default implementation returns
| |
| canUseCharArrays | back to summary |
|---|---|
| public boolean canUseCharArrays() Overrides com. Doc from com. Introspection method that can be used by base factory to check
whether access using
| |
| canUseSchema | back to summary |
|---|---|
| public boolean canUseSchema(FormatSchema schema) Overrides com. Doc from com. 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 JavaPropsFactory copy() Overrides com. Doc from com. Method for constructing a new
| |
| createGenerator | back to summary |
|---|---|
| public JavaPropsGenerator createGenerator(Properties props)
Deprecated
| |
| createGenerator | back to summary |
|---|---|
| public JavaPropsGenerator createGenerator(Map<?, ?> target, JavaPropsSchema schema) Convenience method to allow using a pre-constructed
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(OutputStream out, JsonEncoding enc) throws IOException Overrides com. Doc from com. Method for constructing JSON generator for writing JSON content using specified output stream. Encoding to use must be specified, and needs to be one of available types (as per JSON specification).
Underlying stream is NOT owned by the generator constructed,
so that generator will NOT close the output stream when
Note there are formats that use fixed encoding (like most binary data formats) and that ignore passed in encoding.
| |
| createGenerator | back to summary |
|---|---|
| public JsonGenerator createGenerator(OutputStream out) throws IOException Overrides com. Method for constructing Since CBOR format always uses UTF-8 internally, no encoding need to be passed to this method.
| |
| createParser | back to summary |
|---|---|
| public JavaPropsParser createParser(Map<?, ?> content) Convenience method to allow feeding a pre-parsed
| |
| createParser | back to summary |
|---|---|
| public JavaPropsParser createParser(Properties props)
Deprecated
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(File f) throws IOException Overrides com. Doc from com. Method for constructing JSON parser instance to parse 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(URL url) throws IOException Overrides com. Doc from com. Method for constructing JSON parser instance to parse contents of resource reference by given URL.
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(InputStream in) throws IOException Overrides com. Doc from com. 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(byte[] data) throws IOException Overrides com. Doc from com. Method for constructing parser for parsing the contents of given byte array.
| |
| createParser | back to summary |
|---|---|
| public JsonParser createParser(byte[] data, int offset, int len) throws IOException Overrides com. Doc from com. Method for constructing parser for parsing the contents of given byte array.
| |
| getFormatName | back to summary |
|---|---|
| public String getFormatName() Overrides com. Doc from com. Method that returns short textual id identifying format this factory supports. Note sub-classes should override this method; default implementation will return null for all sub-classes | |
| hasFormat | back to summary |
|---|---|
| public MatchStrength hasFormat(InputAccessor acc) throws IOException Overrides com. Sub-classes need to override this method
| |
| rebuild | back to summary |
|---|---|
| public JavaPropsFactoryBuilder rebuild() Overrides com. Doc from com. Method that allows construction of differently configured factory, starting with settings of this factory.
| |
| requiresPropertyOrdering | back to summary |
|---|---|
| public boolean requiresPropertyOrdering() Overrides com. Doc from com. Introspection method that higher-level functionality may call to see whether underlying data format requires a stable ordering of object properties or not. This is usually used for determining whether to force a stable ordering (like alphabetic ordering by name) if no ordering if explicitly specified.
Default implementation returns
| |
| version | back to summary |
|---|---|
| public Version version() Overrides com. Implements com. Doc from com. 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 | |