コード例 #1
0
  public Template(File file) throws Exception {
    if (file.length() > maxF) tools.util.LogMgr.red(file.length() + " Large Size Template " + file);

    String templ = new String(SharedMethods.getBytesFromFile(file));
    m_template = new StringBuffer(templ);
    m_template2 = new StringBuffer(templ);
    m_file = file.toString();
  }
コード例 #2
0
  /** Constructs a new Template with the specified template. */
  public Template(String file, boolean cr) throws Exception {
    if (cr) new File(file).createNewFile();
    if (file.length() > maxF) tools.util.LogMgr.red(file.length() + " Large Size Template " + file);

    String templ = new String(SharedMethods.getBytesFromFile(file));
    m_template = new StringBuffer(templ);
    m_template2 = new StringBuffer(templ);
    m_file = file;
  }