ambit2.core.io
Class IteratingFileReader

Package class diagram package IteratingFileReader
java.lang.Object
  extended by ambit2.core.io.IteratingFileReader
All Implemented Interfaces:
java.util.Iterator, org.openscience.cdk.io.IChemObjectIO, org.openscience.cdk.io.iterator.IIteratingChemObjectReader

public class IteratingFileReader
extends java.lang.Object
implements org.openscience.cdk.io.iterator.IIteratingChemObjectReader

A wrapper for all file readers.


Field Summary
protected  java.lang.String filename
           
protected  org.openscience.cdk.io.iterator.IIteratingChemObjectReader reader
           
 
Constructor Summary
IteratingFileReader(java.io.File file)
           
IteratingFileReader(java.io.File file, org.openscience.cdk.io.formats.IChemFormat format)
           
 
Method Summary
 boolean accepts(java.lang.Class arg0)
           
 void addChemObjectIOListener(org.openscience.cdk.io.listener.IChemObjectIOListener arg0)
           
 void close()
           
 org.openscience.cdk.io.formats.IResourceFormat getFormat()
           
 org.openscience.cdk.io.setting.IOSetting[] getIOSettings()
           
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 void removeChemObjectIOListener(org.openscience.cdk.io.listener.IChemObjectIOListener arg0)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reader

protected org.openscience.cdk.io.iterator.IIteratingChemObjectReader reader

filename

protected java.lang.String filename
Constructor Detail

IteratingFileReader

public IteratingFileReader(java.io.File file)
                    throws ambit2.base.exceptions.AmbitIOException
Throws:
ambit2.base.exceptions.AmbitIOException

IteratingFileReader

public IteratingFileReader(java.io.File file,
                           org.openscience.cdk.io.formats.IChemFormat format)
                    throws ambit2.base.exceptions.AmbitIOException
Throws:
ambit2.base.exceptions.AmbitIOException
Method Detail

accepts

public boolean accepts(java.lang.Class arg0)
Specified by:
accepts in interface org.openscience.cdk.io.IChemObjectIO

close

public void close()
           throws java.io.IOException
Specified by:
close in interface org.openscience.cdk.io.IChemObjectIO
Throws:
java.io.IOException

getIOSettings

public org.openscience.cdk.io.setting.IOSetting[] getIOSettings()
Specified by:
getIOSettings in interface org.openscience.cdk.io.IChemObjectIO

addChemObjectIOListener

public void addChemObjectIOListener(org.openscience.cdk.io.listener.IChemObjectIOListener arg0)
Specified by:
addChemObjectIOListener in interface org.openscience.cdk.io.IChemObjectIO

removeChemObjectIOListener

public void removeChemObjectIOListener(org.openscience.cdk.io.listener.IChemObjectIOListener arg0)
Specified by:
removeChemObjectIOListener in interface org.openscience.cdk.io.IChemObjectIO

remove

public void remove()
Specified by:
remove in interface java.util.Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getFormat

public org.openscience.cdk.io.formats.IResourceFormat getFormat()
Specified by:
getFormat in interface org.openscience.cdk.io.IChemObjectIO