public class LineReaderAdapter extends java.lang.Object implements RecordProviderIfc
Modifier and Type | Field and Description |
---|---|
protected int |
bodyRecSize |
protected int |
headerRecSize |
protected PosLineReader |
lineReader |
protected long |
position |
protected java.util.LinkedList |
storedLines |
protected java.util.LinkedList |
storedPositions |
protected int |
trailerRecSize |
Constructor and Description |
---|
LineReaderAdapter(AsciiFileDef asciiFileDef) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getFilePosition() |
java.lang.String[] |
getHeader() |
protected java.lang.String[] |
getLines(int numLines) |
java.lang.String[] |
getRecord() |
java.lang.String[] |
getTrailer() |
void |
open(java.io.File file) |
void |
open(java.io.File file,
java.lang.String charsetName) |
protected java.lang.String |
readLine() |
void |
setFilePosition(long pos) |
protected PosLineReader lineReader
protected int headerRecSize
protected int bodyRecSize
protected int trailerRecSize
protected long position
protected java.util.LinkedList storedLines
protected java.util.LinkedList storedPositions
public LineReaderAdapter(AsciiFileDef asciiFileDef)
public java.lang.String[] getHeader() throws java.io.IOException
getHeader
in interface RecordProviderIfc
java.io.IOException
public java.lang.String[] getRecord() throws java.io.IOException
getRecord
in interface RecordProviderIfc
java.io.IOException
public java.lang.String[] getTrailer() throws java.io.IOException
getTrailer
in interface RecordProviderIfc
java.io.IOException
protected java.lang.String[] getLines(int numLines) throws java.io.IOException
java.io.IOException
protected java.lang.String readLine() throws java.io.IOException
java.io.IOException
public void open(java.io.File file) throws java.io.IOException
open
in interface RecordProviderIfc
java.io.IOException
public void open(java.io.File file, java.lang.String charsetName) throws java.io.IOException
open
in interface RecordProviderIfc
java.io.IOException
public void close() throws java.io.IOException
close
in interface RecordProviderIfc
java.io.IOException
public long getFilePosition() throws java.io.IOException
getFilePosition
in interface RecordProviderIfc
java.io.IOException
public void setFilePosition(long pos) throws java.io.IOException
setFilePosition
in interface RecordProviderIfc
java.io.IOException