Reader

Reader类是java.io.InputStream类的镜像。

public abstract class Reader{
    protected Reader(){}
    protected Reader(Object lock){}
    public abstract int read(char[] text,int offset,int length) throws IOException;
    public int read() throws IOException{}
    public int read(char[] text) throws IOException{}
    public long skip(long n) throws IOException{}
    public boolean ready(){}
    public boolean markSupported(){}
    public void mark(int readAheadLimit) throws IOException{}
    public void reset() throws IOException{}
    public abstract void close() throws IOException{}
    

}

read()方法将一个Unicode字符作为一个int返回,可以是0到65535之间的一个值,或者在流结束时返回-1。

 

InputStreamReader是Reader的最重要的子类。

InputStreamReader从其底层输入流(如FileInputStream或TelnetInputStream)中读取字节。它根据指定的编码方式将这些字节转化为字符,并返回这些字符。

public InputStreamReader(InputStream in){}

public InputStreamReader(InputStream in,String encoding) throws UnsupportedEncodingException{}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值