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()