Package com.stripe.util
Class StreamUtils
java.lang.Object
com.stripe.util.StreamUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
readToEnd
(InputStream stream, Charset charset) Reads the provided stream until the end and returns a string encoded with the provided charset.
-
Constructor Details
-
StreamUtils
public StreamUtils()
-
-
Method Details
-
readToEnd
Reads 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:
NullPointerException
- ifstream
orcharset
isnull
IOException
- if an I/O error occurs
-