class HostTxtIterator extends Object implements Iterator<Map.Entry<String,HostTxtEntry>>, Closeable
| Constructor and Description |
|---|
HostTxtIterator()A dummy iterator in which hasNext() is always false. |
HostTxtIterator(File file)An iterator over the key/value pairs in the file. |
| Modifier and Type | Method and Description |
|---|---|
void | close()Close the underlying stream. |
boolean | hasNext()Return true if there is another entry to return. |
Map.Entry<String,HostTxtEntry> | next()Return the next entry. |
void | remove()Not supported. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic HostTxtIterator()
public HostTxtIterator(File file) throws IOException
IOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic boolean hasNext()
hasNext in interface Iterator<Map.Entry<String,HostTxtEntry>>public Map.Entry<String,HostTxtEntry> next()
next in interface Iterator<Map.Entry<String,HostTxtEntry>>NoSuchElementException - if there is no next entrypublic void remove()
remove in interface Iterator<Map.Entry<String,HostTxtEntry>>UnsupportedOperationException - always