|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.core.format.DataFormatMatcher
public class DataFormatMatcher
Result object constructed by DataFormatDetector
when requested
to detect format of given input data.
Field Summary | |
---|---|
protected byte[] |
_bufferedData
Content read during format matching process |
protected int |
_bufferedLength
Number of bytes in _bufferedData that were read. |
protected JsonFactory |
_match
Factory that produced sufficient match (if any) |
protected MatchStrength |
_matchStrength
Strength of match with _match |
protected InputStream |
_originalStream
|
Constructor Summary | |
---|---|
protected |
DataFormatMatcher(InputStream in,
byte[] buffered,
int bufferedLength,
JsonFactory match,
MatchStrength strength)
|
Method Summary | |
---|---|
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. |
JsonFactory |
getMatch()
Accessor for JsonFactory that represents format that data matched. |
String |
getMatchedFormatName()
Accessor for getting brief textual name of matched format if any (null if none). |
MatchStrength |
getMatchStrength()
Method for accessing strength of the match, if any; if no match, will return MatchStrength.INCONCLUSIVE . |
boolean |
hasMatch()
Accessor to use to see if any formats matched well enough with the input data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final InputStream _originalStream
protected final byte[] _bufferedData
protected final int _bufferedLength
_bufferedData
that were read.
protected final JsonFactory _match
protected final MatchStrength _matchStrength
_match
Constructor Detail |
---|
protected DataFormatMatcher(InputStream in, byte[] buffered, int bufferedLength, JsonFactory match, MatchStrength strength)
Method Detail |
---|
public boolean hasMatch()
public MatchStrength getMatchStrength()
MatchStrength.INCONCLUSIVE
.
public JsonFactory getMatch()
JsonFactory
that represents format that data matched.
public String getMatchedFormatName()
return hasMatch() ? getMatch().getFormatName() : null;
public 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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |