20230621 java.io.Writer

介绍

  • java.io.Writer
  • public abstract class Writer implements Appendable, Closeable, Flushable

API

  • write

    • abstract void write(char cbuf[], int off, int len) throws IOException;
      • 唯一的抽象方法
    • void write(int c) throws IOException
      • 写入一个字符(两个字节,一个 char)
    • void write(char cbuf[]) throws IOException
    • void write(String str) throws IOException
    • void write(String str, int off, int len) throws IOException
  • append

    • Writer append(char c) throws IOException
    • Writer append(CharSequence csq) throws IOException
    • Writer append(CharSequence csq, int start, int end) throws IOException
  • flush

  • close

  • nullWriter

posted @ 2023-08-23 09:56  流星<。)#)))≦  阅读(5)  评论(0编辑  收藏  举报