Package org.apache.nifi.stream.io.util
Class TextLineDemarcator.OffsetInfo
java.lang.Object
org.apache.nifi.stream.io.util.TextLineDemarcator.OffsetInfo
- Enclosing class:
TextLineDemarcator
Container to hold offset and meta info for a computed text line.
The offset and meta info is represented with the following 4 values:
- startOffset - the offset in the overall stream which represents the beginning of the text line
- length - length of the text line including CRLF characters
- crlfLength - the length of the CRLF.
Value 0 is returned if text line represents the last text line in the
InputStream
(i.e., EOF) and such line does not terminate with CR or LF or the combination of the two. Value 1 is returned if text line ends with '\n' or '\r'. Value 2 is returned if line ends with '\r\n'). - startsWithMatch -
true
by default unlessstartWith
bytes are provided and not matched. SeeTextLineDemarcator.nextOffsetInfo(byte[])
for more info.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final long
private final long
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
long
long
boolean
(package private) void
setStartsWithMatch
(boolean startsWithMatch) toString()
-
Field Details
-
startOffset
private final long startOffset -
length
private final long length -
crlfLength
private final int crlfLength -
startsWithMatch
private boolean startsWithMatch
-
-
Constructor Details
-
OffsetInfo
private OffsetInfo(long startOffset, long length, int crlfLength)
-
-
Method Details