public static String readAll ( final InputStream inputStream , Charset charset ) throws IOException { return new ByteSource ( ) { @ Override public InputStream openStream ( ) { return inputStream ; } } . asCharSource ( charset ) . read ( ) ; }
Reads all input into memory close the steam and return as a String . Reads the input