Package com.stripe.util
Class StreamUtils
- java.lang.Object
-
- com.stripe.util.StreamUtils
-
public final class StreamUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StreamUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringreadToEnd(java.io.InputStream stream, java.nio.charset.Charset charset)Reads the provided stream until the end and returns a string encoded with the provided charset.
-
-
-
Method Detail
-
readToEnd
public static java.lang.String readToEnd(java.io.InputStream stream, java.nio.charset.Charset charset) throws java.io.IOExceptionReads the provided stream until the end and returns a string encoded with the provided charset.- Parameters:
stream- the stream to readcharset- the charset to use- Returns:
- a string with the contents of the input stream
- Throws:
java.lang.NullPointerException- ifstreamorcharsetisnulljava.io.IOException- if an I/O error occurs
-
-