public class QueueReader extends Reader
| Constructor and Description |
|---|
QueueReader(Reader is) |
| Modifier and Type | Method and Description |
|---|---|
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 in class ReaderIOExceptionpublic boolean isEnd()
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic boolean startWith(String start) throws IOException
start - IOExceptionpublic int getCol()
public int getRow()
Copyright © 2017. All rights reserved.