Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.javaprop

public Class JavaPropsParser

extends ParserMinimalBase
Class Inheritance
Imports
java.io.*, java.math.BigDecimal, .BigInteger, java.util.Map, .Properties, com.fasterxml.jackson.core.*, com.fasterxml.jackson.core.base.ParserMinimalBase, com.fasterxml.jackson.core.io.IOContext, com.fasterxml.jackson.core.util.ByteArrayBuilder, .JacksonFeatureSet, com.fasterxml.jackson.dataformat.javaprop.io.JPropReadContext, com.fasterxml.jackson.dataformat.javaprop.util.JPropNode, .JPropNodeBuilder

Field Summary

Modifier and TypeField and Description
protected byte[]
protected ByteArrayBuilder
protected boolean
protected final Object
_inputSource

Although most massaging is done later, caller may be interested in the ultimate source.

protected final IOContext
protected ObjectCodec
_objectCodec

Codec used for data binding when (if) requested.

protected JPropReadContext
protected JavaPropsSchema
_schema

Schema we use for parsing Properties into structure of some kind.

protected final Map<?, ?>
_sourceContent

Actual java.util.Properties (or, actually, any java.util.Map with String keys, values) that were parsed and handed to us for further processing.

protected static final JavaPropsSchema
protected static final JacksonFeatureSet<StreamReadCapability>
STREAM_READ_CAPABILITIES

Properties capabilities slightly different from defaults, having untyped (text-only) scalars

Inherited from com.fasterxml.jackson.core.base.ParserMinimalBase:
_currToken_lastClearedTokenBD_MAX_INTBD_MAX_LONGBD_MIN_INTBD_MIN_LONGBI_MAX_INTBI_MAX_LONGBI_MIN_INTBI_MIN_LONGCHAR_NULLINT_0INT_9INT_APOSINT_ASTERISKINT_BACKSLASHINT_COLONINT_COMMAINT_CRINT_eINT_EINT_HASHINT_LBRACKETINT_LCURLYINT_LFINT_MINUSINT_PERIODINT_PLUSINT_QUOTEINT_RBRACKETINT_RCURLYINT_SLASHINT_SPACEINT_TABMAX_ERROR_TOKEN_LENGTHMAX_INT_DMAX_INT_LMAX_LONG_DMIN_INT_DMIN_INT_LMIN_LONG_DNO_BYTESNO_INTSNR_BIGDECIMALNR_BIGINTNR_DOUBLENR_FLOATNR_INTNR_LONGNR_UNKNOWN

Constructor Summary

AccessConstructor and Description
public
JavaPropsParser(IOContext ctxt, Object inputSource, int parserFeatures, ObjectCodec codec, Properties sourceProps)
Deprecated

public
JavaPropsParser(IOContext ctxt, int parserFeatures, Object inputSource, ObjectCodec codec, Map<?, ?> sourceMap)

Method Summary

Modifier and TypeMethod and Description
public ByteArrayBuilder
protected void
_handleEOF()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase._handleEOF.

Method sub-classes need to implement for verifying that end-of-content is acceptable at current input position.

protected <T> T
public boolean
canReadObjectId()

Overrides com.fasterxml.jackson.core.JsonParser.canReadObjectId.

Introspection method that may be called to see if the underlying data format supports some kind of Object Ids natively (many do not; for example, JSON doesn't).

public boolean
canReadTypeId()

Overrides com.fasterxml.jackson.core.JsonParser.canReadTypeId.

Introspection method that may be called to see if the underlying data format supports some kind of Type Ids natively (many do not; for example, JSON doesn't).

public boolean
canUseSchema(FormatSchema
Schema to check
schema
)

Overrides com.fasterxml.jackson.core.JsonParser.canUseSchema.

Method that can be used to verify that given schema can be used with this parser (using setSchema).

public void
close()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.close.

Implements java.io.Closeable.close.

Closes the parser so that no further iteration or data access can be made; will also close the underlying input source if parser either owns the input source, or feature Feature#AUTO_CLOSE_SOURCE is enabled.

public JsonLocation
currentLocation()

Overrides com.fasterxml.jackson.core.JsonParser.currentLocation.

Method that returns location of the last processed input unit (character or byte) from the input; usually for error reporting purposes.

public String
currentName()

Overrides com.fasterxml.jackson.core.JsonParser.currentName.

Method that can be called to get the name associated with the current token: for JsonToken#FIELD_NAMEs it will be the same as what getText returns; for field values it will be preceding field name; and for others (array values, root-level values) null.

public JsonLocation
currentTokenLocation()

Overrides com.fasterxml.jackson.core.JsonParser.currentTokenLocation.

Method that return the starting location of the current (most recently returned) token; that is, the position of the first input unit (character or byte) from input that starts the current token.

public BigInteger
getBigIntegerValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getBigIntegerValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can not be used as a Java long primitive type due to its magnitude.

public byte[]
getBinaryValue(Base64Variant
Expected variant of base64 encoded content (see Base64Variants for definitions of "standard" variants).
variant
)

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getBinaryValue.

Method that can be used to read (and consume -- results may not be accessible using other methods after the call) base64-encoded binary data included in the current textual JSON value.

public ObjectCodec
getCodec()

Implements abstract com.fasterxml.jackson.core.JsonParser.getCodec.

Accessor for ObjectCodec associated with this parser, if any.

public JsonLocation
getCurrentLocation()

Implements abstract com.fasterxml.jackson.core.JsonParser.getCurrentLocation.

Deprecated

Deprecated alias for currentLocation() (removed from Jackson 3.0).

public String
public BigDecimal
getDecimalValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getDecimalValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT or JsonToken#VALUE_NUMBER_INT.

public double
getDoubleValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getDoubleValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java double primitive type.

public Object
getEmbeddedObject()

Overrides com.fasterxml.jackson.core.JsonParser.getEmbeddedObject.

Accessor that can be called if (and only if) the current token is JsonToken#VALUE_EMBEDDED_OBJECT.

public float
getFloatValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getFloatValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_FLOAT and it can be expressed as a Java float primitive type.

public Object
getInputSource()

Overrides com.fasterxml.jackson.core.JsonParser.getInputSource.

Method that can be used to get access to object that is used to access input being parsed; this is usually either InputStream or Reader, depending on what parser was constructed with.

public int
getIntValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getIntValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a value of Java int primitive type.

public long
getLongValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getLongValue.

Numeric accessor that can be called when the current token is of type JsonToken#VALUE_NUMBER_INT and it can be expressed as a Java long primitive type.

public JsonParser.NumberType
getNumberType()

Implements abstract com.fasterxml.jackson.core.JsonParser.getNumberType.

If current token is of type JsonToken#VALUE_NUMBER_INT or JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberType constants; otherwise returns null.

public JsonParser.NumberTypeFP
getNumberTypeFP()

Overrides com.fasterxml.jackson.core.JsonParser.getNumberTypeFP.

If current token is of type JsonToken#VALUE_NUMBER_FLOAT, returns one of NumberTypeFP constants; otherwise returns NumberTypeFP#UNKNOWN.

public Number
getNumberValue()

Implements abstract com.fasterxml.jackson.core.JsonParser.getNumberValue.

Generic number value accessor method that will work for all kinds of numeric values.

public JsonStreamContext
getParsingContext()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getParsingContext.

Method that can be used to access current parsing context reader is in. There are 3 different types: root, array and object contexts, with slightly different available information.

public JacksonFeatureSet<StreamReadCapability>
getReadCapabilities()

Overrides com.fasterxml.jackson.core.JsonParser.getReadCapabilities.

Accessor for getting metadata on capabilities of this parser, based on underlying data format being read (directly or indirectly).

public JavaPropsSchema
getSchema()

Overrides com.fasterxml.jackson.core.JsonParser.getSchema.

Method for accessing Schema that this parser uses, if any.

public String
getText()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getText.

Method for accessing textual representation of the current token; if no current token (before first call to nextToken, or after encountering end-of-input), returns null.

public int
getText(Writer
Writer to write textual content to
writer
)

Overrides com.fasterxml.jackson.core.JsonParser.getText.

Method to read the textual representation of the current token in chunks and pass it to the given Writer.

public char[]
getTextCharacters()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextCharacters.

Method similar to getText, but that will return underlying (unmodifiable) character array that contains textual value, instead of constructing a String object to contain this information.

public int
getTextLength()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextLength.

Accessor used with getTextCharacters, to know length of String stored in returned buffer.

public int
getTextOffset()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.getTextOffset.

Accessor used with getTextCharacters, to know offset of the first text content character within buffer.

public JsonLocation
getTokenLocation()

Implements abstract com.fasterxml.jackson.core.JsonParser.getTokenLocation.

Deprecated

Deprecated alias for currentTokenLocation() (removed from Jackson 3.0).

public boolean
hasTextCharacters()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.hasTextCharacters.

Method that can be used to determine whether calling of getTextCharacters would be the most efficient way to access textual content for the event parser currently points to.

public boolean
isClosed()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.isClosed.

Method that can be called to determine whether this parser is closed or not.

public JsonToken
nextToken()

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.nextToken.

Main iteration method, which will advance stream enough to determine type of the next token, if any.

public void
overrideCurrentName(String
Name to use as the current name; may be null.
name
)

Implements abstract com.fasterxml.jackson.core.base.ParserMinimalBase.overrideCurrentName.

Method that can be used to change what is considered to be the current (field) name.

public boolean
requiresCustomCodec()

Overrides com.fasterxml.jackson.core.JsonParser.requiresCustomCodec.

Method that can be called to determine if a custom ObjectCodec is needed for binding data parsed using JsonParser constructed by this factory (which typically also implies the same for serialization with JsonGenerator).

public void
setCodec(ObjectCodec
Codec to assign, if any; null if none
c
)

Implements abstract com.fasterxml.jackson.core.JsonParser.setCodec.

Setter that allows defining ObjectCodec associated with this parser, if any.

public void
setSchema(FormatSchema
Schema to use
schema
)

Overrides com.fasterxml.jackson.core.JsonParser.setSchema.

Method to call to make this parser use specified schema.

public Version
version()

Implements abstract com.fasterxml.jackson.core.JsonParser.version.

Implements com.fasterxml.jackson.core.Versioned.version.

Accessor for getting version of the core package, given a parser instance.

Inherited from com.fasterxml.jackson.core.base.ParserMinimalBase:
_ascii_asciiBytes_constructError_decodeBase64_getCharDesc_hasTextualNull_longIntegerDesc_longNumberDesc_reportError_reportError_reportError_reportInputCoercion_reportInvalidEOF_reportInvalidEOF_reportInvalidEOF_reportInvalidEOFInValue_reportInvalidEOFInValue_reportMissingRootWS_reportUnexpectedChar_reportUnexpectedNumberChar_throwInternal_throwInvalidSpace_wrapErrorclearCurrentTokencurrentTokencurrentTokenIdgetCurrentTokengetCurrentTokenIdgetLastClearedTokengetValueAsBooleangetValueAsDoublegetValueAsIntgetValueAsIntgetValueAsLonggetValueAsLonggetValueAsStringgetValueAsStringhasCurrentTokenhasTokenhasTokenIdisExpectedNumberIntTokenisExpectedStartArrayTokenisExpectedStartObjectTokennextValuereportInvalidNumberreportOverflowIntreportOverflowIntreportOverflowIntreportOverflowLongreportOverflowLongreportOverflowLongreportUnexpectedNumberCharskipChildren