Class DataFormatReaders
java.lang.Object
com.fasterxml.jackson.databind.deser.DataFormatReaders
Alternative to
DataFormatDetector that needs to be used when
using data-binding.- Since:
- 2.1
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBy default we will look ahead at most 64 bytes; in most cases, much less (4 bytes or so) is needed, but we will allow bit more leniency to support data formats that need more complex heuristics. -
Constructor Summary
ConstructorsConstructorDescriptionDataFormatReaders(ObjectReader... detectors) DataFormatReaders(Collection<ObjectReader> detectors) -
Method Summary
Modifier and TypeMethodDescriptionfindFormat(byte[] fullInputData) Method to call to find format that given content (full document) has, as per configuration of this detector instance.findFormat(byte[] fullInputData, int offset, int len) Method to call to find format that given content (full document) has, as per configuration of this detector instance.Method to call to find format that content (accessible via givenInputStream) given has, as per configuration of this detector instance.toString()with(DeserializationConfig config) with(ObjectReader[] readers) withMaxInputLookahead(int lookaheadBytes) withMinimalMatch(MatchStrength minMatch) withOptimalMatch(MatchStrength optMatch)
-
Field Details
-
DEFAULT_MAX_INPUT_LOOKAHEAD
public static final int DEFAULT_MAX_INPUT_LOOKAHEADBy default we will look ahead at most 64 bytes; in most cases, much less (4 bytes or so) is needed, but we will allow bit more leniency to support data formats that need more complex heuristics.- See Also:
-
-
Constructor Details
-
DataFormatReaders
-
DataFormatReaders
-
-
Method Details
-
withOptimalMatch
-
withMinimalMatch
-
with
-
withMaxInputLookahead
-
with
-
withType
-
findFormat
Method to call to find format that content (accessible via givenInputStream) given has, as per configuration of this detector instance.- Returns:
- Matcher object which contains result; never null, even in cases where no match (with specified minimal match strength) is found.
- Throws:
IOException
-
findFormat
Method to call to find format that given content (full document) has, as per configuration of this detector instance.- Returns:
- Matcher object which contains result; never null, even in cases where no match (with specified minimal match strength) is found.
- Throws:
IOException
-
findFormat
public DataFormatReaders.Match findFormat(byte[] fullInputData, int offset, int len) throws IOException Method to call to find format that given content (full document) has, as per configuration of this detector instance.- Returns:
- Matcher object which contains result; never null, even in cases where no match (with specified minimal match strength) is found.
- Throws:
IOException- Since:
- 2.1
-
toString
-