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 void
close()
protected void
finalize()
boolean
hasNext()
byte[]
next()
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<byte[]>
-
next
public byte[] next()
- Specified by:
next
in interfacejava.util.Iterator<byte[]>
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-