|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsbrt.shell.io.SerializedInputFile<E>
E
- the type contained in instances of this interface.public class SerializedInputFile<E>
This class is used to read input files containing serialized objects.
Constructor Summary | |
---|---|
SerializedInputFile(java.lang.String fileName)
Constructs a new text input file using the provided argument. |
|
SerializedInputFile(java.lang.String fileName,
FileFormat fileFormat)
Constructs a new text input file using the provided arguments. |
Method Summary | |
---|---|
void |
close()
Closes this file. |
protected void |
finalize()
Disposes of system resources associated with this file when called by the garbage collector. |
java.lang.String |
getCanonicalName()
Returns the canonical name of this file. |
FileFormat |
getFileFormat()
Returns the format of this file. |
java.lang.String |
getOriginalName()
Returns the original name given to this file object. |
boolean |
isClosed()
Indicates if this file has already been closed. |
static boolean |
isValidFormat(FileFormat fileFormat)
Indicates if the provided file format is valid for a text input file. |
java.util.Iterator<E> |
iterator()
Returns an object iterator over this file. |
protected SerializedFileIterator<?> |
objectIterator()
Returns an object iterator over this file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerializedInputFile(java.lang.String fileName)
fileName
- the name of the file to be read.public SerializedInputFile(java.lang.String fileName, FileFormat fileFormat)
fileName
- the name of the file to be read.fileFormat
- the format of the file to be read.Method Detail |
---|
public static boolean isValidFormat(FileFormat fileFormat)
fileFormat
- the file format to test.
true
if the provided file format is
valid for a text input file; false
otherwise.public FileFormat getFileFormat()
public final java.lang.String getOriginalName()
getOriginalName
in interface SbrtFile
public java.lang.String getCanonicalName()
getCanonicalName
in interface SbrtFile
File.getCanonicalPath()
protected final SerializedFileIterator<?> objectIterator()
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
public final void close()
close
in interface SbrtFile
ApplicationException
- if an I/O error occurred
while closing this file.public boolean isClosed()
isClosed
in interface SbrtFile
true
if this file is closed;
false
othewise.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 |