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'IOExceptionpublic String readLine() throws IOException
IOExceptionpublic int poll()
throws IOException
IOExceptionpublic int peek(int index)
throws IOException
index - IOExceptionpublic int peekNext()
throws IOException
IOExceptionpublic int peek()
throws IOException
IOExceptionpublic long skip(long n)
throws IOException
skip 在类中 ReaderIOExceptionpublic boolean isEnd()
public int read(char[] cbuf,
int off,
int len)
throws IOException
read 在类中 ReaderIOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 ReaderIOExceptionpublic boolean startWith(String start) throws IOException
start - IOExceptionpublic int getCol()
public int getRow()
Copyright © 2017. All rights reserved.