Kagetaka

net.hizlab.kagetaka.io
クラス TextOutputStream

java.lang.Object
  拡張java.io.OutputStream
      拡張java.io.FilterOutputStream
          拡張net.hizlab.kagetaka.io.TextOutputStream

public class TextOutputStream
extends FilterOutputStream

文字列も出力できるストリームです。

バージョン:
$Revision: 1.1.1.1 $

フィールドの概要
 
クラス java.io.FilterOutputStream から継承したフィールド
out
 
コンストラクタの概要
TextOutputStream(OutputStream out, String encoding)
          指定したエンコーディングで文字列を出力するストリームを作成します。
 
メソッドの概要
 void close()
          クローズします。
 void flush()
          ストリームをフラッシュします。
 String getEncoding()
          現在の文字列エンコーディングを返します。
 void write(byte[] b, int off, int len)
          バイト列を出力します。
 void write(char c)
          単独文字を出力します。
 void write(char[] cbuf, int off, int len)
          文字の配列を出力します。
 void write(int b)
          バイトデータを出力します。
 void write(String s)
          文字列を出力します。
 void write(String s, int off, int len)
          文字列を出力します。
 
クラス java.io.FilterOutputStream から継承したメソッド
write
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

TextOutputStream

public TextOutputStream(OutputStream out,
                        String encoding)
指定したエンコーディングで文字列を出力するストリームを作成します。

パラメータ:
out - 出力先
encoding - 文字列のエンコーディング
メソッドの詳細

close

public void close()
           throws IOException
クローズします。

例外:
IOException - IO エラーが発生した場合

flush

public void flush()
           throws IOException
ストリームをフラッシュします。

例外:
IOException - IO エラーが発生した場合

getEncoding

public String getEncoding()
現在の文字列エンコーディングを返します。

戻り値:
エンコーディング

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
バイト列を出力します。

パラメータ:
b - バイト
off - 書き出すオフセット
len - 書き出す長さ
例外:
IOException - IO エラーが発生した場合

write

public void write(char c)
           throws IOException
単独文字を出力します。

パラメータ:
c - 文字
例外:
IOException - IO エラーが発生した場合

write

public void write(char[] cbuf,
                  int off,
                  int len)
           throws IOException
文字の配列を出力します。

パラメータ:
cbuf - 文字の配列
off - 書き出すオフセット
len - 書き出す長さ
例外:
IOException - IO エラーが発生した場合

write

public void write(int b)
           throws IOException
バイトデータを出力します。

パラメータ:
b - バイト
例外:
IOException - IO エラーが発生した場合

write

public void write(String s)
           throws IOException
文字列を出力します。

パラメータ:
s - 文字列
例外:
IOException - IO エラーが発生した場合

write

public void write(String s,
                  int off,
                  int len)
           throws IOException
文字列を出力します。

パラメータ:
s - 文字列
off - 書き出すオフセット
len - 書き出す長さ
例外:
IOException - IO エラーが発生した場合

Kagetaka

Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'