Class IoUtils
- java.lang.Object
-
- com.mongodb.stitch.core.internal.common.IoUtils
-
public final class IoUtils extends Object
-
-
Method Summary
Modifier and Type Method Description static byte[]readAllToBytes(InputStream in)Reads the entireInputStreamto EOF and returns the data as bytes.static StringreadAllToString(InputStream in)Reads the entireInputStreamto EOF and returns the data as a string.
-
-
-
Method Detail
-
readAllToBytes
public static byte[] readAllToBytes(InputStream in) throws IOException
Reads the entireInputStreamto EOF and returns the data as bytes.- Parameters:
in- the stream to read.- Returns:
- the read data as bytes.
- Throws:
IOException- in the event the data cannot be read.
-
readAllToString
public static String readAllToString(InputStream in) throws IOException
Reads the entireInputStreamto EOF and returns the data as a string.- Parameters:
in- the stream to read.- Returns:
- the read data as a string.
- Throws:
IOException- in the event the data cannot be read.
-
-