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, wait
forEachRemaining, remove
forEach, spliterator
public 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()
SafeCloseable
close
in interface SafeCloseable
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.