public class QueueReader extends Reader
构造器和说明 |
---|
QueueReader(Reader is) |
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
int |
getCol() |
int |
getRow() |
boolean |
isEnd()
是否结束
|
int |
peek()
访问头部字节, 不删除
|
int |
peek(int index)
访问头部开始第几个字节, 不删除
|
int |
peekNext()
访问上次peekNext访问的下个位置的字节, 未访问过则访问索引0, poll, peek后归零, 不删除
|
int |
poll()
读取头部字节, 并删除
|
int |
read(char[] cbuf,
int off,
int len) |
String |
readItem(char... ends)
读取一项数据
|
String |
readLine()
读取一行
|
long |
skip(long n)
跳过和丢弃输入流中的数据
|
boolean |
startWith(String start)
是否以 start 开始
|
public QueueReader(Reader is)
public String readItem(char... ends) throws IOException
ends
- 结束符, 默认' ', '\r', '\n'IOException
public String readLine() throws IOException
IOException
public int poll() throws IOException
IOException
public int peek(int index) throws IOException
index
- IOException
public int peekNext() throws IOException
IOException
public int peek() throws IOException
IOException
public long skip(long n) throws IOException
skip
在类中 Reader
IOException
public boolean isEnd()
public int read(char[] cbuf, int off, int len) throws IOException
read
在类中 Reader
IOException
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 AutoCloseable
close
在类中 Reader
IOException
public boolean startWith(String start) throws IOException
start
- IOException
public int getCol()
public int getRow()
Copyright © 2017. All rights reserved.