20230621 java.io.Reader

发布时间 2023-08-29 17:08:03作者: 流星<。)#)))≦

介绍

  • java.io.Reader
  • public abstract class Reader implements Readable, Closeable

API

  • read

    • abstract int read(char[] cbuf, int off, int len) throws IOException;
      • 唯一的抽象方法
    • int read() throws IOException
    • int read(char[] cbuf) throws IOException
    • int read(CharBuffer target) throws IOException
      • 实现 Readable.read
  • skip

  • ready

    • 是否已准备好被读入
    • 如果保证下一个 read() 不会阻塞输入,则为 true,否则为 false。请注意,返回 false 并不能保证下一次读取会阻塞。
  • markSupported

  • mark

  • reset

  • transferTo

  • nullReader