src/main/java/com/mxgraph/util/mxUtils.java
public static String readInputStream(InputStream stream) throws IOException
	{
		BufferedReader reader = new BufferedReader(
				new InputStreamReader(stream));
		StringBuffer result = new StringBuffer();
		String tmp = reader.readLine();

		while (tmp != null)
		{
			result.append(tmp + "\n");
			tmp = reader.readLine();
		}

		reader.close();

		return result.toString();
	}
/**
	 * Reads the given filename into a string.
	 * 
	 * @param filename
	 *            Name of the file to be read.
	 * @return Returns a string representing the file contents.
	 * @throws IOException
	 */
Reads the given filename into a string.

@param filename
Name of the file to be read.
@return Returns a string representing the file contents.
Reads the given filename into a string . @param filename Name of the file to be read . @return Returns a string representing the file contents .
public static String readInputStream(InputStream stream) throws IOException
	{
		BufferedReader reader = new BufferedReader(
				new InputStreamReader(stream));
		StringBuffer result = new StringBuffer();
		String tmp = reader.readLine();
		while (tmp != null)
		{
			result.append(tmp + "\n");
			tmp = reader.readLine();
		}
		reader.close();
		return result.toString();
	}
public static String readInputStream ( InputStream stream ) throws IOException { BufferedReader reader = new BufferedReader ( new InputStreamReader ( stream ) ) ; StringBuffer result = new StringBuffer ( ) ; String tmp = reader . readLine ( ) ; while ( tmp != null ) { result . append ( tmp + "\n" ) ; tmp = reader . readLine ( ) ; } reader . close ( ) ; return result . toString ( ) ; }
Reads the given filename into a string.
Reads the given filename into a string .