Package org.camunda.spin.spi
Class TextBasedDataFormatReader
java.lang.Object
org.camunda.spin.spi.TextBasedDataFormatReader
- All Implemented Interfaces:
DataFormatReader
- Direct Known Subclasses:
DomXmlDataFormatReader
,JacksonJsonDataFormatReader
Can be used as a base class to determine whether an input reader
is readable by applying regular expression matching.
- Author:
- Lindhauer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this reader estimates to be able to consume the input data.protected abstract Pattern
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.camunda.spin.spi.DataFormatReader
readInput
-
Constructor Details
-
TextBasedDataFormatReader
public TextBasedDataFormatReader()
-
-
Method Details
-
canRead
Description copied from interface:DataFormatReader
Returns true if this reader estimates to be able to consume the input data. Implementations may not read more thanreadLimit
bytes from the supplied reader.- Specified by:
canRead
in interfaceDataFormatReader
- Parameters:
input
- reader that can be read from to detect a data formatreadLimit
- positive number that poses a restriction on how many characters an implementation may read. Reading beyond this limit may lead to incomplete input when the methodDataFormatReader.readInput(Reader)
is invoked.- Returns:
- true if this reader is able to consume the input
-
getInputDetectionPattern
-