FileWriter クラス
- [内容]
- 文字をファイルへ出力するためのクラスです
- [コンストラクタ]
- public FileWriter(File file) throws IOException
- public FileWriter(String fileName) throws IOException
- public FileWriter(String fileName, boolean append) throws IOException
- ファイル名を指定して FileWriter オブジェクトを生成する
- [主なメソッド]
- public void close() throws IOException ( OutputStreamWriter から継承)
- ファイルを閉じる
- public void flush() throws IOException ( OutputStreamWriter から継承)
- ストリームをフラッシュする
- public void write(int c) throws IOException ( OutputStreamWriter から継承)
- 1 文字の出力
- public void write(String s) throws IOException ( Writer から継承)
- 文字列の出力
- [使用例]
- プログラム例は,テキストファイルに対する入出力の例です.
- [参照]
- System, OutputStream, OutputStreamWriter, InputStreamReader