public abstract class AbstractTextDemarcator extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
availableBytesLength |
(package private) char[] |
buffer |
(package private) int |
index |
private static int |
INIT_BUFFER_SIZE |
(package private) int |
mark |
private int |
maxDataSize |
private Reader |
reader |
| Constructor and Description |
|---|
AbstractTextDemarcator(Reader reader,
int maxDataSize)
Constructs an instance of demarcator with provided
InputStream
and max buffer size. |
AbstractTextDemarcator(Reader reader,
int maxDataSize,
int initialBufferSize)
Constructs an instance of demarcator with provided
InputStream
and max buffer size and initial buffer size. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
(package private) void |
fill()
Will fill the current buffer from current 'index' position, expanding it
and or shuffling it if necessary.
|
private void |
validate(Reader reader,
int maxDataSize,
int initialBufferSize)
Validates prerequisites for constructor arguments
|
private static final int INIT_BUFFER_SIZE
private final Reader reader
private final int maxDataSize
char[] buffer
int index
int mark
int availableBytesLength
AbstractTextDemarcator(Reader reader, int maxDataSize)
InputStream
and max buffer size. Each demarcated token must fit within max buffer
size, otherwise the exception will be raised.AbstractTextDemarcator(Reader reader, int maxDataSize, int initialBufferSize)
InputStream
and max buffer size and initial buffer size. Each demarcated token must
fit within max buffer size, otherwise the exception will be raised.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionvoid fill() throws IOException
BufferOverflowException will be thrown.IOException - if unable to read from the streamprivate void validate(Reader reader, int maxDataSize, int initialBufferSize)
Copyright © 2023 Apache NiFi Project. All rights reserved.