exense-basic-commons/src/main/java/ch/exense/commons/io/FileHelper.java
/**
	 * Reads the stream provided as argument using UTF8 charset
	 * @param is the stream to be read
	 * @return the content of the stream
	 */
Reads the stream provided as argument using UTF8 charset
@param is the stream to be read
@return the content of the stream
Reads the stream provided as argument using UTF8 charset @param is the stream to be read @return the content of the stream
public static String readStream(InputStream is) {
		try (Scanner scanner = new Scanner(is, StandardCharsets.UTF_8.name())) {
			return scanner.useDelimiter("\\A").next().replaceAll("\r\n", "\n");
		}
	}
public static String readStream ( InputStream is ) { try ( Scanner scanner = new Scanner ( is , StandardCharsets . UTF_8 . name ( ) ) ) { return scanner . useDelimiter ( "\\A" ) . next ( ) . replaceAll ( "\r\n" , "\n" ) ; } }
Reads the stream provided as argument using UTF8 charset
 @param is the stream to be read
 @return the content of the stream
Reads the stream provided as argument using UTF8 charset @param is the stream to be read @return the content of the stream