public class FastStringReader extends Reader
public FastStringReader(String s)
s - 供读取的Stringpublic int read()
throws IOException
read 在类中 ReaderIOException - IO异常public int read(char[] charBuffer,
int off,
int len)
throws IOException
read 在类中 ReadercharBuffer - 目标bufferoff - 开始位置len - 读取最大长度IOException - IO异常public long skip(long ns)
throws IOException
ns 参数可能为负数, 负数表示向前跳过,跳到开头则停止
如果字符串所有字符被读取或跳过, 此方法无效,始终返回0.
skip 在类中 ReaderIOException - IO异常public boolean ready()
throws IOException
ready 在类中 ReaderIOExceptionpublic boolean markSupported()
markSupported 在类中 Readerpublic void mark(int readAheadLimit)
throws IOException
mark 在类中 ReaderIOExceptionpublic void reset()
throws IOException
reset 在类中 ReaderIOExceptionCopyright © 2024. All rights reserved.