public static String readToString(InputStream inputStream, Charset charset) throws IOException {
        return new String(FileCopyUtils.copyToByteArray(inputStream), charset);
    }
public static String readToString ( InputStream inputStream , Charset charset ) throws IOException { return new String ( FileCopyUtils . copyToByteArray ( inputStream ) , charset ) ; }
Read file input stream to string value.
@param inputStream
@param charset
@return
@throws IOException