public class SDIStringUtil
extends java.lang.Object
Constructor and Description |
---|
SDIStringUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
convertInputStreamToString(java.io.InputStream in)
Convert the given input stream into a string with the given encoding.
|
static java.lang.String |
convertInputStreamToString(java.io.InputStream in,
java.lang.String encoding,
boolean close)
Convert the given input stream into a string with the given encoding.
|
public static java.lang.String convertInputStreamToString(java.io.InputStream in) throws java.io.UnsupportedEncodingException, java.io.IOException
in
- The input stream to convert to string.java.io.UnsupportedEncodingException
java.io.IOException
public static java.lang.String convertInputStreamToString(java.io.InputStream in, java.lang.String encoding, boolean close) throws java.io.UnsupportedEncodingException, java.io.IOException
in
- The input stream to convert to string.encoding
- The encoding used to read the stream bytes to string.close
- Whether or not to close the input stream on completion of the read.java.io.UnsupportedEncodingException
java.io.IOException