モジュール java.base
パッケージ java.io

クラスFilterWriter

  • すべての実装されたインタフェース:
    Closeable, Flushable, Appendable, AutoCloseable

    public abstract class FilterWriter
    extends Writer
    フィルタ処理された文字ストリームのための抽象クラスです。 抽象クラスFilterWriterそのものが、格納されているストリームにすべての要求を渡すデフォルトのメソッドを提供します。 FilterWriterのサブクラスは、これらのメソッドの一部をオーバーライドし、追加のメソッドやフィールドを提供することもできます。
    導入されたバージョン:
    1.1
    • フィールドのサマリー

      フィールド 
      修飾子と型 フィールド 説明
      protected Writer out
      ベースとなる文字出力ストリームです。
      • クラス java.io.Writerで宣言されたフィールド

        lock
    • コンストラクタのサマリー

      コンストラクタ 
      修飾子 コンストラクタ 説明
      protected FilterWriter​(Writer out)
      フィルタ処理された新しいライターを作成します。
    • フィールドの詳細

      • out

        protected Writer out
        ベースとなる文字出力ストリームです。
    • コンストラクタの詳細

      • FilterWriter

        protected FilterWriter​(Writer out)
        フィルタ処理された新しいライターを作成します。
        パラメータ:
        out - ベースとなるストリームを提供するWriterオブジェクト。
        例外:
        NullPointerException - outnullである場合
    • メソッドの詳細

      • write

        public void write​(int c)
                   throws IOException
        単一の文字を書き込みます。
        オーバーライド:
        write、クラス: Writer
        パラメータ:
        c - 書き込まれる文字を指定するint
        例外:
        IOException - 入出力エラーが発生した場合
      • write

        public void write​(char[] cbuf,
                          int off,
                          int len)
                   throws IOException
        文字の配列の一部を書き込みます。
        定義:
        write、クラス: Writer
        パラメータ:
        cbuf - 書き込む文字のバッファ
        off - 文字の読込み開始オフセット
        len - 書き込む文字数
        例外:
        IndexOutOfBoundsException - offおよびlenパラメータの値によって、下にあるWriterの対応するメソッドがIndexOutOfBoundsExceptionをスローする場合
        IOException - 入出力エラーが発生した場合
      • write

        public void write​(String str,
                          int off,
                          int len)
                   throws IOException
        文字列の一部を書き込みます。
        オーバーライド:
        write、クラス: Writer
        パラメータ:
        str - 書き込まれる文字列
        off - 文字の読込み開始オフセット
        len - 書き込む文字数
        例外:
        IndexOutOfBoundsException - offおよびlenパラメータの値によって、下にあるWriterの対応するメソッドがIndexOutOfBoundsExceptionをスローする場合
        IOException - 入出力エラーが発生した場合
      • flush

        public void flush()
                   throws IOException
        ストリームをフラッシュします。
        定義:
        flush、インタフェース: Flushable
        定義:
        flush、クラス: Writer
        例外:
        IOException - 入出力エラーが発生した場合