public class LineIterator extends Object implements Iterator<String>, Iterable<String>, SafeCloseable, Serializable
| Constructor and Description |
|---|
LineIterator(Reader reader) |
LineIterator(Reader reader,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
LineIterator |
autoClose(boolean autoClose)
设置流自动关闭
|
void |
close()
安全关闭
|
boolean |
hasNext() |
Iterator<String> |
iterator() |
String |
next() |
LineIterator |
skip(long skip)
设置偏移量
|
LineIterator |
skipLine(int skipLine)
设置偏移行
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removeforEach, spliteratorpublic LineIterator(Reader reader)
public LineIterator(Reader reader, int bufferSize)
public LineIterator autoClose(boolean autoClose)
autoClose - 是否自动关闭public LineIterator skip(long skip)
skip - 偏移量public LineIterator skipLine(int skipLine)
skipLine - 偏移行public void close()
SafeCloseableclose in interface SafeCloseableclose in interface Closeableclose in interface AutoCloseableCopyright © 2025. All rights reserved.