@@ -0,0 +1,920 @@
+package foam.util;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.io.Reader;%0Aimport java.io.UnsupportedEncodingException;%0A%0A/**%0A * Reads the entire contents of an %7B@link InputStream%7D into a %7B@link String%7D.%0A *%0A * Make sure the file isn't too big!%0A */%0Apublic class WholeStreamReader %7B%0A  private String contents;%0A  public WholeStreamReader(InputStream is) %7B%0A    char%5B%5D buffer = new char%5B1024%5D;%0A    StringBuilder sb = new StringBuilder();%0A    try %7B%0A      Reader in = new InputStreamReader(is, %22UTF-8%22);%0A      while (true) %7B%0A        int rsz = in.read(buffer, 0, buffer.length);%0A        if (rsz %3C 0) break;%0A        sb.append(buffer, 0, rsz);%0A      %7D%0A%0A      contents = sb.toString();%0A    %7D catch(UnsupportedEncodingException e) %7B%0A      contents = null;%0A    %7D catch(IOException e) %7B%0A      contents = null;%0A    %7D%0A  %7D%0A%0A  public String toString() %7B%0A    return contents;%0A  %7D%0A%7D%0A

Add util package and foam.util.WholeStreamReader