ambit2.core.io
Class RandomAccessSDFReader
java.lang.Object
org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader
ambit2.core.io.RandomAccessReader
ambit2.core.io.RandomAccessSDFReader
- All Implemented Interfaces:
- ambit2.base.interfaces.IRandomAccessChemObjectReader, java.lang.Runnable, java.util.Iterator, java.util.ListIterator, org.openscience.cdk.io.IChemObjectIO, org.openscience.cdk.io.iterator.IIteratingChemObjectReader
public class RandomAccessSDFReader
- extends RandomAccessReader
Random access of SDF file. Doesn't load molecules in memory, uses prebuilt index and seeks to find the correct record offset.
Fields inherited from class ambit2.core.io.RandomAccessReader |
b, builder, chemObjectReader, currentRecord, headerOptions, index, indexCreated, indexVersion, logger, raFile, records |
Constructor Summary |
RandomAccessSDFReader(java.io.File file,
org.openscience.cdk.interfaces.IChemObjectBuilder builder)
|
RandomAccessSDFReader(java.io.File file,
org.openscience.cdk.interfaces.IChemObjectBuilder builder,
org.openscience.cdk.io.listener.IReaderListener listener)
|
Methods inherited from class ambit2.core.io.RandomAccessReader |
add, addChemObjectIOListener, close, finalize, first, getChemObjectReader, getCurrentRecord, getIndexFile, getNumberOfRecords, hasNext, hasPrevious, isIndexCreated, last, loadIndex, makeIndex, next, nextIndex, previous, previousIndex, read, readRecord, removeChemObjectIOListener, resize, run, saveIndex, set, setChemObjectReader, setIndexCreated, size, toString |
Methods inherited from class org.openscience.cdk.io.iterator.DefaultIteratingChemObjectReader |
accepts, fireFrameRead, fireIOSettingQuestion, getIOSettings, remove |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.ListIterator |
remove |
RandomAccessSDFReader
public RandomAccessSDFReader(java.io.File file,
org.openscience.cdk.interfaces.IChemObjectBuilder builder)
throws java.io.IOException
- Parameters:
file
- builder
-
- Throws:
java.io.IOException
RandomAccessSDFReader
public RandomAccessSDFReader(java.io.File file,
org.openscience.cdk.interfaces.IChemObjectBuilder builder,
org.openscience.cdk.io.listener.IReaderListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
createChemObjectReader
public org.openscience.cdk.io.IChemObjectReader createChemObjectReader()
- Specified by:
createChemObjectReader
in class RandomAccessReader
isRecordEnd
protected boolean isRecordEnd(java.lang.String line)
- Specified by:
isRecordEnd
in class RandomAccessReader
getFormat
public org.openscience.cdk.io.formats.IResourceFormat getFormat()
readContent
public java.lang.Object readContent(java.lang.String buffer,
int length)
throws org.openscience.cdk.exception.CDKException
- Overrides:
readContent
in class RandomAccessReader
- Throws:
org.openscience.cdk.exception.CDKException