Package it.unimi.dsi.io
Class FileLinesByteArrayIterable.FileLinesIterator
- java.lang.Object
-
- it.unimi.dsi.io.FileLinesByteArrayIterable.FileLinesIterator
-
- All Implemented Interfaces:
SafelyCloseable,java.io.Closeable,java.lang.AutoCloseable,java.util.Iterator<byte[]>
- Enclosing class:
- FileLinesByteArrayIterable
public static final class FileLinesByteArrayIterable.FileLinesIterator extends java.lang.Object implements java.util.Iterator<byte[]>, SafelyCloseable
An iterator over the lines of aFileLinesByteArrayIterable.Instances of this class open an
InputStream, and thus should be closed after usage. A “safety-net” finaliser tries to take care of the cases in which closing an instance is impossible. An exhausted iterator, however, will be closed automagically.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected voidfinalize()booleanhasNext()byte[]next()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<byte[]>
-
next
public byte[] next()
- Specified by:
nextin interfacejava.util.Iterator<byte[]>
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-