@PublicAPI public interface MRecordReader
Modifier and Type | Interface and Description |
---|---|
static class |
MRecordReader.Position
Position in the input file.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the input stream.
|
chemaxon.common.util.LongVector |
detectRecordPositions(chemaxon.common.util.IntVector linenums)
Detects positions of records in the input stream.
|
MRecordReader |
getEncapsulatedReader()
Gets the encapsulated record reader if it exists.
|
long |
getFilePointer()
Gets the current position in the input file.
|
java.lang.String |
getFooterAsString()
Gets the footer of the file as a string.
|
java.lang.String |
getHeaderAsString()
Gets the header of the file as a string.
|
int |
getLineCount()
Get the current line number.
|
MolInputStream |
getMolInputStream()
Gets the molecule input stream.
|
java.lang.String |
getOptions()
Gets the import options.
|
java.lang.String |
getRecognizedFormat()
Gets the recognized file format.
|
boolean |
isPropertyRecord() |
boolean |
isSeekable()
Tests whether the record reader is seekable.
|
MRecord |
nextRecord()
Reads the next record.
|
void |
seek(long p,
int lcount,
int k)
Sets the file-pointer offset, measured from the beginning of this
file, at which the next read or write occurs.
|
void |
setProgressMonitor(MProgressMonitor pmon)
Sets the progress monitor.
|
MRecord |
skipRecord()
Skips the next record.
|
void setProgressMonitor(MProgressMonitor pmon)
pmon
- the progress monitorMRecord nextRecord() throws MRecordParseException, java.io.IOException
MRecordParseException
- If the record could not be parsedjava.io.IOException
- If I/O error occuredMRecord skipRecord() throws MRecordParseException, java.io.IOException
MRecordParseException
- If the record could not be parsedjava.io.IOException
- If I/O error occuredjava.lang.String getRecognizedFormat()
java.lang.String getHeaderAsString()
java.lang.String getFooterAsString()
java.lang.String getOptions()
void close() throws java.io.IOException
java.io.IOException
- If I/O error occuredMRecordReader getEncapsulatedReader()
null
MolInputStream getMolInputStream()
long getFilePointer()
int getLineCount()
boolean isSeekable()
true
if it is seekable,
false
otherwisevoid seek(long p, int lcount, int k) throws java.io.IOException
p
- the file pointerlcount
- the line count at the specified positionk
- the record count at the specified positionjava.io.IOException
- if pos
is less than
0
or if an I/O error occurs.boolean isPropertyRecord()
chemaxon.common.util.LongVector detectRecordPositions(chemaxon.common.util.IntVector linenums) throws MolFormatException
linenums
- If not null, stores start line numbers of records
in this container.MolFormatException