/** * Return a string representation of a given amount of seconds * * @param s * @return */ public static String seconds2String(long s) { long seconds = s; int minutes = (int) seconds / 60; seconds = seconds % 60; return StringUtils.getString(minutes, ":", (seconds < 10 ? "0" : ""), seconds); }
public static String getString(Thing thing, String attribute, ActionContext actionContext) throws IOException, TemplateException { return StringUtils.getString(thing, attribute, actionContext); }
/** * Return a string representation of a given amount of milliseconds * * @param millis * @return */ public static String milliseconds2String(long millis) { long aux = millis / 1000; int minutes = (int) aux / 60; aux = aux % 60; return StringUtils.getString(minutes, ":", (aux < 10 ? "0" : ""), aux); }
/** * 对org.xmeta.util.StringUtil的补充。 * * @param value * @param actionContext * @return * @throws TemplateException * @throws IOException */ public static String getString(String value, ActionContext actionContext) throws IOException, TemplateException { return StringUtils.getString(value, actionContext); }