DataFormatDetector when requested
to detect format of given input data.
| Modifier and Type | Field and Description |
|---|---|
| protected final byte[] | _bufferedData
Content read during format matching process |
| protected final int | _bufferedLength
Number of bytes available in buffer. |
| protected final int | _bufferedStart
Pointer to the first byte in buffer available for reading |
| protected final JsonFactory | _match
Factory that produced sufficient match (if any) |
| protected final MatchStrength | _matchStrength
Strength of match with |
| protected final InputStream |
| Access | Constructor and Description |
|---|---|
| protected | DataFormatMatcher(InputStream in, byte[] buffered, int bufferedStart, int bufferedLength, JsonFactory match, MatchStrength strength)
|
| Modifier and Type | Method and Description |
|---|---|
| public JsonParser | |
| public InputStream | Returns: InputStream to use for reading actual content using format detectedMethod to use for accessing input for which format detection has been done. |
| public JsonFactory | Returns: RelevantJsonFactory to indicate matched formatAccessor for |
| public String | Returns: Name of the format that is acceptable match, if any;null if noneAccessor for getting brief textual name of matched format if any (null if none). |
| public MatchStrength | Returns: Strength of matchMethod for accessing strength of the match, if any; if no match,
will return |
| public boolean | Returns: Whether format has a matchAccessor to use to see if any formats matched well enough with the input data. |
| _bufferedData | back to summary |
|---|---|
| protected final byte[] _bufferedData Content read during format matching process | |
| _bufferedLength | back to summary |
|---|---|
| protected final int _bufferedLength Number of bytes available in buffer. | |
| _bufferedStart | back to summary |
|---|---|
| protected final int _bufferedStart Pointer to the first byte in buffer available for reading | |
| _match | back to summary |
|---|---|
| protected final JsonFactory _match Factory that produced sufficient match (if any) | |
| _matchStrength | back to summary |
|---|---|
| protected final MatchStrength _matchStrength Strength of match with | |
| _originalStream | back to summary |
|---|---|
| protected final InputStream _originalStream | |
| DataFormatMatcher | back to summary |
|---|---|
| protected DataFormatMatcher(InputStream in, byte[] buffered, int bufferedStart, int bufferedLength, JsonFactory match, MatchStrength strength) | |
| createParserWithMatch | back to summary |
|---|---|
| public JsonParser createParserWithMatch() throws IOException | |
| getDataStream | back to summary |
|---|---|
| public InputStream getDataStream() Method to use for accessing input for which format detection has been done. This must be used instead of using stream passed to detector unless given stream itself can do buffering. Stream will return all content that was read during matching process, as well as remaining contents of the underlying stream.
| |
| getMatch | back to summary |
|---|---|
| public JsonFactory getMatch() Accessor for
| |
| getMatchedFormatName | back to summary |
|---|---|
| public String getMatchedFormatName() Accessor for getting brief textual name of matched format if any (null if none). Equivalent to: return hasMatch() ? getMatch().getFormatName() : null;
| |
| getMatchStrength | back to summary |
|---|---|
| public MatchStrength getMatchStrength() Method for accessing strength of the match, if any; if no match,
will return
| |
| hasMatch | back to summary |
|---|---|
| public boolean hasMatch() Accessor to use to see if any formats matched well enough with the input data.
| |