java.lang.Object
edu.iu.IuStream
Efficient stream utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
copy
(InputStream in, OutputStream out) Copies all data from anInputStream
to anOutputStream
.static void
static byte[]
read
(InputStream in) Reads all data from anInputStream
and returns as abyte[]
.static String
-
Method Details
-
read
Reads all data from anInputStream
and returns as abyte[]
.- Parameters:
in
-InputStream
- Returns:
byte[]
containing all data- Throws:
IOException
- If a read error occurs
-
read
- Parameters:
in
- Reader- Returns:
- String
- Throws:
IOException
- If a read error occurs
-
copy
Copies all data from anInputStream
to anOutputStream
.- Parameters:
in
- InputStreamout
- OutputStream- Throws:
IOException
- If an error occurs on either stream
-
copy
- Parameters:
in
- Readerout
- Writer- Throws:
IOException
- If an error occurs on either stream
-