public class InputStreamUtil extends Object
InputStream用のユーティリティクラス。| コンストラクタと説明 |
|---|
InputStreamUtil() |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
static int |
available(InputStream is)
InputStream.available()の例外処理をラップする。 |
static void |
close(InputStream is)
InputStreamを閉じる。 |
static void |
closeSilently(InputStream is)
InputStreamを閉じる。 |
static void |
copy(InputStream is,
OutputStream os)
InputStreamの内容を OutputStreamにコピーする。 |
static byte[] |
getBytes(InputStream is)
InputStreamからbyteの配列を取得する。 |
static void |
reset(InputStream is)
InputStreamをリセットする。 |
public static void close(InputStream is) throws IORuntimeException
InputStreamを閉じる。is - 入力ストリームIORuntimeException - IOExceptionが発生した場合InputStream.close()public static void closeSilently(InputStream is) throws IORuntimeException
InputStreamを閉じる。is - 入力ストリームIORuntimeException - IOExceptionが発生した場合InputStream.close()public static final byte[] getBytes(InputStream is) throws IORuntimeException
InputStreamからbyteの配列を取得する。is - 入力ストリームIORuntimeException - IOExceptionが発生した場合public static final void copy(InputStream is, OutputStream os) throws IORuntimeException
InputStreamの内容を OutputStreamにコピーする。is - 入力ストリームos - 出力ストリームIORuntimeException - IOExceptionが発生した場合public static int available(InputStream is) throws IORuntimeException
InputStream.available()の例外処理をラップする。is - 入力ストリームIORuntimeException - IOExceptionが発生した場合public static void reset(InputStream is) throws IORuntimeException
InputStreamをリセットする。is - 入力ストリームIORuntimeException - IOExceptionが発生した場合InputStream.reset()