public static class DataFormatReaders.Match extends Object
DataFormatMatcher
Modifier and Type | Field | Description |
---|---|---|
protected byte[] |
_bufferedData |
Content read during format matching process
|
protected int |
_bufferedLength |
Number of bytes available in buffer.
|
protected int |
_bufferedStart |
Pointer to the first byte in buffer available for reading
|
protected ObjectReader |
_match |
Factory that produced sufficient match (if any)
|
protected com.fasterxml.jackson.core.format.MatchStrength |
_matchStrength |
Strength of match with
_match |
protected InputStream |
_originalStream |
Modifier | Constructor | Description |
---|---|---|
protected |
Match(InputStream in,
byte[] buffered,
int bufferedStart,
int bufferedLength,
ObjectReader match,
com.fasterxml.jackson.core.format.MatchStrength strength) |
Modifier and Type | Method | Description |
---|---|---|
com.fasterxml.jackson.core.JsonParser |
createParserWithMatch() |
Convenience method for trying to construct a
JsonParser for
parsing content which is assumed to be in detected data format. |
InputStream |
getDataStream() |
Method to use for accessing input for which format detection has been done.
|
String |
getMatchedFormatName() |
Accessor for getting brief textual name of matched format if any (null
if none).
|
com.fasterxml.jackson.core.format.MatchStrength |
getMatchStrength() |
Method for accessing strength of the match, if any; if no match,
will return
MatchStrength.INCONCLUSIVE . |
ObjectReader |
getReader() |
Accessor for
JsonFactory that represents format that data matched. |
boolean |
hasMatch() |
Accessor to use to see if any formats matched well enough with
the input data.
|
protected final InputStream _originalStream
protected final byte[] _bufferedData
protected final int _bufferedStart
protected final int _bufferedLength
protected final ObjectReader _match
protected final com.fasterxml.jackson.core.format.MatchStrength _matchStrength
_match
protected Match(InputStream in, byte[] buffered, int bufferedStart, int bufferedLength, ObjectReader match, com.fasterxml.jackson.core.format.MatchStrength strength)
public boolean hasMatch()
public com.fasterxml.jackson.core.format.MatchStrength getMatchStrength()
MatchStrength.INCONCLUSIVE
.public ObjectReader getReader()
JsonFactory
that represents format that data matched.public String getMatchedFormatName()
return hasMatch() ? getMatch().getFormatName() : null;
public com.fasterxml.jackson.core.JsonParser createParserWithMatch() throws IOException
JsonParser
for
parsing content which is assumed to be in detected data format.
If no match was found, returns null.IOException
public InputStream getDataStream()
Copyright © 2008–2018. All rights reserved.