public class ReaderInputStream extends InputStream
| 构造器和说明 |
|---|
ReaderInputStream(Reader reader)
带Reader参数构造函数
|
ReaderInputStream(Reader reader,
String encoding)
带Reader和字符编码格式参数的构造函数
|
ReaderInputStream(String readerString)
带Reader参数构造函数
|
public ReaderInputStream(String readerString)
readerString - - 要阅读的字符串。public ReaderInputStream(Reader reader)
reader - - InputStream使用的Readerpublic ReaderInputStream(Reader reader, String encoding) throws UnsupportedEncodingException
reader - - InputStream使用的Readerencoding - - InputStream使用的字符编码格式.UnsupportedEncodingException - 如果字符编码格式不支持,则抛 UnsupportedEncodingException 异常public int read()
throws IOException
read 在类中 InputStreamIOExceptionInputStream.read()public int read(byte[] data,
int off,
int len)
throws IOException
read 在类中 InputStreamIOExceptionInputStream.read(byte[], int, int)public int available()
throws IOException
available 在类中 InputStreamIOExceptionInputStream.available()public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 InputStreamIOExceptionInputStream.close()Copyright © 2022. All rights reserved.