public class StreamLineIterator extends java.lang.Object implements OffsetIterator<java.lang.String>
Constructor and Description |
---|
StreamLineIterator(java.io.FileInputStream raf,
java.lang.String encoding) |
StreamLineIterator(java.io.InputStream stream,
java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getOffset()
Returns the current opaque offset within the underlying data stream
|
boolean |
hasNext() |
java.lang.String |
next() |
void |
remove() |
public StreamLineIterator(java.io.FileInputStream raf, java.lang.String encoding) throws java.io.IOException
raf
- file steramencoding
- optional encodingjava.io.IOException
- on errorpublic StreamLineIterator(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
stream
- text streamencoding
- encodingjava.io.IOException
- on errorpublic boolean hasNext()
hasNext
in interface java.util.Iterator<java.lang.String>
public java.lang.String next()
next
in interface java.util.Iterator<java.lang.String>
public long getOffset()
OffsetIterator
getOffset
in interface OffsetIterator<java.lang.String>
public void remove()
remove
in interface java.util.Iterator<java.lang.String>
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException