|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.io.FileLineIterator<E>
sbrt.shell.io.SerializedFileIterator<E>
E
- the returned type.public final class SerializedFileIterator<E>
This class is used to iterate over the objects in a serialized input file.
Constructor Summary | |
---|---|
SerializedFileIterator(SerializedInputFile<E> file)
Constructs a new serialized file iterator using the provided serialized input file. |
Method Summary | |
---|---|
void |
close()
Closes this file iterator. |
protected void |
finalize()
Disposes of system resources associated with this file iterator when called by the garbage collector. |
boolean |
hasNext()
Indicates if the file has more serialized objects. |
boolean |
isClosed()
Indicates if this iterator has been closed. |
static boolean |
isValidFormat(FileFormat fileFormat)
Indicates if the provided file format is valid for this type of file iterator. |
E |
next()
Returns the next object in the file. |
protected java.lang.Object |
nextObject()
Returns the next object in the file. |
void |
remove()
Throws UnsupportedOperationException. |
Methods inherited from class sbrt.shell.io.FileLineIterator |
---|
checkFile |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializedFileIterator(SerializedInputFile<E> file)
file
- the file to be iterated over.Method Detail |
---|
public static boolean isValidFormat(FileFormat fileFormat)
fileFormat
- the file format to test.
true
if the provided file format is
valid for a serialized input file; false
otherwise.public boolean hasNext()
true
if the file has more objects;
false
otherwise.public E next()
java.util.NoSuchElementException
- if the file
has no more objects.protected final java.lang.Object nextObject()
ApplicationException
- if an error occurs while
the file is being read.
java.util.NoSuchElementException
- if the file
has no more objects.public void remove()
java.lang.UnsupportedOperationException
public boolean isClosed()
true
if close() has
been called; false
otherwise.public void close()
ApplicationException
- if an I/O error occurred
while closing this file iterator.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- the Exception raised by this method.Object.finalize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |