コード例 #1
0
ファイル: Main.java プロジェクト: pnikonowicz/rabu-schedule
  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
ファイル: Main.java プロジェクト: pnikonowicz/rabu-schedule
 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);
 }