org.jscience.io
Class ObjectEnumerator

java.lang.Object
  extended by org.jscience.util.AbstractIterator
      extended by org.jscience.io.ObjectEnumerator
All Implemented Interfaces:
java.util.Enumeration, java.util.Iterator

public class ObjectEnumerator
extends AbstractIterator

used to iterate over (potentially serialized) objects contained in a binary file or inputstream.

See Also:
ExtendedFile.objectEnumerator(), ExtendedFile.objectEnumerator(boolean), ExtendedFile.objectEnumerator(boolean,Logger)

Constructor Summary
ObjectEnumerator(java.io.File file, boolean useDeserialization)
          Creates a new ObjectEnumerator object.
ObjectEnumerator(java.io.File file, boolean useDeserialization, Logger exceptionLogger)
          Creates a new ObjectEnumerator object.
ObjectEnumerator(java.io.InputStream stream, boolean useDeserialization)
          Creates a new ObjectEnumerator object.
ObjectEnumerator(java.io.InputStream stream, boolean useDeserialization, Logger exceptionLogger)
          Creates a new ObjectEnumerator object.
 
Method Summary
protected  void finalize()
          closes the embedded input stream
 java.lang.Object getNextObject()
          DOCUMENT ME!
 
Methods inherited from class org.jscience.util.AbstractIterator
enumerate, hasMoreElements, hasNext, iterate, list, list, next, nextElement, remove, reverseEnumeration, sortEnumeration
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectEnumerator

public ObjectEnumerator(java.io.File file,
                        boolean useDeserialization)
                 throws java.io.FileNotFoundException
Creates a new ObjectEnumerator object.

Parameters:
file - DOCUMENT ME!
useDeserialization - DOCUMENT ME!
Throws:
java.io.FileNotFoundException - DOCUMENT ME!

ObjectEnumerator

public ObjectEnumerator(java.io.File file,
                        boolean useDeserialization,
                        Logger exceptionLogger)
                 throws java.io.FileNotFoundException
Creates a new ObjectEnumerator object.

Parameters:
file - DOCUMENT ME!
useDeserialization - DOCUMENT ME!
exceptionLogger - DOCUMENT ME!
Throws:
java.io.FileNotFoundException - DOCUMENT ME!

ObjectEnumerator

public ObjectEnumerator(java.io.InputStream stream,
                        boolean useDeserialization)
Creates a new ObjectEnumerator object.

Parameters:
stream - DOCUMENT ME!
useDeserialization - DOCUMENT ME!

ObjectEnumerator

public ObjectEnumerator(java.io.InputStream stream,
                        boolean useDeserialization,
                        Logger exceptionLogger)
Creates a new ObjectEnumerator object.

Parameters:
stream - DOCUMENT ME!
useDeserialization - DOCUMENT ME!
exceptionLogger - DOCUMENT ME!
Method Detail

finalize

protected void finalize()
                 throws java.io.IOException
closes the embedded input stream

Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException - DOCUMENT ME!

getNextObject

public java.lang.Object getNextObject()
                               throws java.lang.Exception
DOCUMENT ME!

Specified by:
getNextObject in class AbstractIterator
Returns:
DOCUMENT ME!
Throws:
java.lang.Exception - DOCUMENT ME!