java.lang.Object
edu.iu.IuStream
Efficient stream utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(InputStream in, OutputStream out) Copies all data from anInputStreamto anOutputStream.static voidstatic byte[]read(InputStream in) Reads all data from anInputStreamand returns as abyte[].static String
-
Method Details
-
read
Reads all data from anInputStreamand 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 anInputStreamto 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
-