예제 #1
0
  private static void process() throws UnsupportedEncodingException, IOException {
    String template = loadResource("projection.html");
    String config = SimpleFile.loadFromStream(System.in, CHARSET);

    String output = new Generator(template, config).html();
    SimpleFile.writeToStream(System.out, output, CHARSET);
  }
예제 #2
0
 private static String loadResource(String name) throws UnsupportedEncodingException, IOException {
   InputStream templateStream = Main.class.getResourceAsStream("resources/" + name);
   if (templateStream == null) throw new MissingResourceException(name);
   return SimpleFile.loadFromStream(templateStream, CHARSET);
 }