List of usage examples for java.lang StringBuilder append
@Override public StringBuilder append(double d)
From source file:Main.java
public static String iCalHeader() { StringBuilder sb = new StringBuilder(); sb.append("BEGIN:VCALENDAR").append("\n"); sb.append("VERSION:2.0").append("\n"); sb.append("PRODID:-//bobbin v0.1//NONSGML iCal Writer//EN").append("\n"); sb.append("CALSCALE:GREGORIAN").append("\n"); sb.append("METHOD:PUBLISH").append("\n"); return sb.toString(); }
From source file:Main.java
public static String getUnTypedTemplateName(String methodName) { StringBuilder sb = new StringBuilder(); sb.append("method_"); sb.append(methodName);/*from w w w . ja v a 2s. c o m*/ return sb.toString(); }
From source file:Main.java
private static String getImgDirPath() { StringBuilder dirPath = new StringBuilder(); dirPath.append(System.getProperty("user.dir")); dirPath.append(SEPARATOR + "report" + SEPARATOR + "worktemp" + SEPARATOR + "images" + SEPARATOR); return dirPath.toString(); }
From source file:Main.java
public static String dumpStack(Thread t) { StringBuilder sb = new StringBuilder(); sb.append(t.getName() + "[" + t.getId() + "] - " + t.getState() + ":\n"); for (StackTraceElement ste : t.getStackTrace()) { sb.append("\tat " + ste.getClassName() + "." + ste.getMethodName() + "(" + ste.getFileName() + ":" + ste.getLineNumber() + ")\n"); }//from ww w .j a v a 2s . c om return sb.toString(); }
From source file:Main.java
public static StringBuilder append(final StringBuilder in, final String text) { return in.append(text); }
From source file:Main.java
public static String getUtteranceId(String packageName, long notificationId) { StringBuilder utteranceId = new StringBuilder(); utteranceId.append(notificationId).append("_").append(packageName); return utteranceId.toString(); }
From source file:Main.java
public static StringBuilder attribute(StringBuilder builder, String name) { return builder.append("<dia:attribute name=\"").append(name).append("\"/>"); }
From source file:Main.java
public static void appendXmlTag(StringBuilder sb, String tagName, Object value) { sb.append("<" + tagName + ">"); sb.append(value);/*w w w . j a va 2 s. c om*/ sb.append("</" + tagName + ">"); }
From source file:Main.java
/** * Reformat an RRULE style UNTIL to an EAS style until *///from w w w. java 2 s . c om static String recurrenceUntilToEasUntil(String until) { StringBuilder sb = new StringBuilder(); sb.append(until.substring(0, 4)); sb.append(until.substring(4, 6)); sb.append(until.substring(6, 8)); sb.append("T000000Z"); return sb.toString(); }
From source file:Main.java
/** * Wraps an xml tag with '</' and '>'. *//*from w w w . ja v a2 s.co m*/ public static String xmlWrapEnd(String str) { StringBuilder buf = new StringBuilder(); buf.append("</"); buf.append(str); buf.append(">\n"); return buf.toString(); }