public class FileReaderImpl extends java.lang.Object implements FileReader
Constructor and Description |
---|
FileReaderImpl(ReadableDataLocation dataFile,
java.lang.String endOfLineTag) |
FileReaderImpl(ReadableDataLocation dataFile,
java.lang.String endOfLineTag,
int startindex,
int endIndex) |
FileReaderImpl(ReadableDataLocation dataFile,
java.lang.String endOfLineTag,
int startindex,
int endIndex,
java.lang.String charset) |
FileReaderImpl(ReadableDataLocation dataFile,
java.lang.String endOfLineTag,
java.lang.String charset) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the reader and any resources associated with the reader
|
void |
copyToStream(java.io.OutputStream out)
Copies the EDI file to the specified OutputStream
|
java.lang.String |
getCurrentLine()
Reads the current line - minus the prefix, if the prefix is unknown then an exception is thrown
|
int |
getLineNumber()
Returns the line number of the current line, the first line being '1'
|
java.lang.String |
getNextLine()
Move the file pointer to the next line and returns that line.
|
boolean |
isBackLine()
Returns true is the reader has flagged this to move back a line, as moving back a line does not actually change the current line
details
|
void |
moveBackLine()
Moves back to the last line read
|
boolean |
moveNext()
Moves the file pointer to the next line.
|
void |
resetReader()
Resets the reader to the start of the file
|
public FileReaderImpl(ReadableDataLocation dataFile, java.lang.String endOfLineTag)
public FileReaderImpl(ReadableDataLocation dataFile, java.lang.String endOfLineTag, java.lang.String charset)
public FileReaderImpl(ReadableDataLocation dataFile, java.lang.String endOfLineTag, int startindex, int endIndex)
public FileReaderImpl(ReadableDataLocation dataFile, java.lang.String endOfLineTag, int startindex, int endIndex, java.lang.String charset)
public void resetReader()
resetReader
in interface FileReader
public boolean moveNext()
FileReader
moveNext
in interface FileReader
public java.lang.String getNextLine()
FileReader
getNextLine
in interface FileReader
public boolean isBackLine()
FileReader
isBackLine
in interface FileReader
public java.lang.String getCurrentLine()
FileReader
getCurrentLine
in interface FileReader
public int getLineNumber()
FileReader
getLineNumber
in interface FileReader
public void moveBackLine()
moveBackLine
in interface FileReader
public void copyToStream(java.io.OutputStream out)
FileReader
copyToStream
in interface FileReader
public void close()
FileReader
close
in interface FileReader