Package blbutil
Interface FileIt<E>
- Type Parameters:
E
- the type of the elements returned by this iterator'snext()
method.
- All Superinterfaces:
AutoCloseable
,Closeable
,Iterator<E>
- All Known Subinterfaces:
SampleFileIt<E>
,VcfFileIt<E>
- All Known Implementing Classes:
BGZipIt
,BlockLineReader
,Bref3It
,InputIt
,IntervalVcfIt
,RefIt
,VcfIt
An iterator for data elements in a file. If an IOException
is thrown while reading a file, the IOException
is trapped,
an appropriate error message is written to standard out, and the
Java Virtual Machine is terminated. The Iterator.remove()
method
is unsupported and throws an UnsupportedOperationException
.
When the FileIt
object is no longer needed, the close()
method should be invoked to release any system resources controlled
by the object.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the input stream and releases any system resources that are associated with it.file()
Returns the file from which the data are read, ornull
if the data are read from standard input or if the data source is unknown.toString()
Returns a string representation ofthis
.Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
file
File file()Returns the file from which the data are read, ornull
if the data are read from standard input or if the data source is unknown.- Returns:
- the file from which the data are read, or
null
if the data are read from standard input or if the data source is unknown
-
close
void close()Closes the input stream and releases any system resources that are associated with it. If the input stream is already closed then invoking this method has no effect.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
toString
String toString()Returns a string representation ofthis
. The exact details of the representation are unspecified and subject to change.
-