C
- the type of the RbfLowLevelConfigurationpublic abstract class RbfLowLevelDeserializerImpl<C extends RbfLowLevelConfiguration> extends Object implements RbfLowLevelDeserializer
RbfLowLevelDeserializer
.Constructor and Description |
---|
RbfLowLevelDeserializerImpl(C config)
Constructs a new
RbfLowLevelDeserializerImpl . |
Modifier and Type | Method and Description |
---|---|
void |
close(boolean closeReader)
Closes the deserialization stream.
|
protected C |
getConfiguration()
Returns the configuration object.
|
protected LineSegment.Terminator |
getCurrentSegmentTerminator() |
protected String |
getCurrentSegmentTerminatorString() |
InputPosition |
getInputPosition()
Returns information about the current position within the input stream.
|
List<Line> |
getStoredLines()
Returns a list of lines stored during deserialization.
|
protected boolean |
hasNextChar()
Returns true, if there is another character on the current line segment to read.
|
protected char |
nextChar()
Returns the next character of the current line segment and moves one character forward.
|
protected String |
nextString(int length)
Returns the next
String with the given length of the current line segment and moves forward
accordingly. |
void |
open(Reader reader)
Opens a new deserialization stream based on the given reader.
|
protected char |
peekChar()
Returns the current character of the current line segment.
|
boolean |
readNextRecord()
Reads the next record from the stream.
|
protected boolean |
readNextSegment()
Reads the next segment from the stream.
|
protected int |
remainingLineLength() |
void |
unreadRecord()
Unreads the already read record so that it can be read again with
RbfLowLevelDeserializer.readNextRecord() . |
public RbfLowLevelDeserializerImpl(C config)
RbfLowLevelDeserializerImpl
.config
- the configuration objectpublic final void open(Reader reader)
open
in interface LowLevelDeserializer
reader
- the reader to base the stream on.public final boolean readNextRecord()
readNextRecord
in interface RbfLowLevelDeserializer
public final void unreadRecord()
RbfLowLevelDeserializer.readNextRecord()
.unreadRecord
in interface RbfLowLevelDeserializer
public final void close(boolean closeReader)
closeReader
is true.close
in interface LowLevelDeserializer
closeReader
- if true, the underlying reader will be closed, too.public final InputPosition getInputPosition()
getInputPosition
in interface LowLevelDeserializer
public List<Line> getStoredLines()
getStoredLines
in interface RbfLowLevelDeserializer
LineFilter
protected final C getConfiguration()
protected final boolean hasNextChar()
protected final char peekChar()
protected final char nextChar()
protected final String nextString(int length)
String
with the given length of the current line segment and moves forward
accordingly.length
- the length of the String
to returnString
protected final int remainingLineLength()
protected boolean readNextSegment()
protected String getCurrentSegmentTerminatorString()
protected LineSegment.Terminator getCurrentSegmentTerminator()
Copyright © 2014. All rights reserved.