SafelyCloseable
, java.io.Closeable
, java.lang.AutoCloseable
, java.util.Iterator<byte[]>
public static final class FileLinesByteArrayCollection.FileLinesIterator extends java.lang.Object implements java.util.Iterator<byte[]>, SafelyCloseable
FileLinesByteArrayCollection
.
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.
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
protected void |
finalize() |
|
boolean |
hasNext() |
|
byte[] |
next() |
public boolean hasNext()
hasNext
in interface java.util.Iterator<byte[]>
public byte[] next()
next
in interface java.util.Iterator<byte[]>
public void close()
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable