List of usage examples for java.lang StringBuffer append
@Override public synchronized StringBuffer append(double d)
From source file:Main.java
public static String formatFaces(String emojiName) { //System.out.println("emojiName=="+emojiName); StringBuffer sb = new StringBuffer(); sb.append("<img src=\"emoji_"); sb.append(emojiName);/*from ww w .jav a 2s .c om*/ sb.append("\">"); return sb.toString(); }
From source file:Main.java
public static String generateGroupID(String title, String date) { start++;//w w w. jav a2s . c o m StringBuffer result = new StringBuffer(); result.append(title).append(date).append(start); return result.toString(); }
From source file:Main.java
public static final String parseDateTime1(String timeStr) { StringBuffer sb = new StringBuffer(); sb.append(timeStr.substring(0, 4)).append("-").append(timeStr.substring(4, 6)).append("-") .append(timeStr.substring(6, 8)).append(" ").append(timeStr.substring(8, 10)).append(":") .append(timeStr.substring(10, 12)).append(":").append(timeStr.substring(12, 14)); return sb.toString(); }
From source file:Main.java
public static String generatePostID(String title, String date) { start++;/*from w w w .j a v a2 s.c o m*/ StringBuffer result = new StringBuffer(); result.append(title).append(date).append(start); return result.toString(); }
From source file:Main.java
public static String generateCommentID(String title, String date) { start++;/*from w ww . j a va 2s . c o m*/ StringBuffer result = new StringBuffer(); result.append(title).append(date).append(start); return result.toString(); }
From source file:Main.java
private static void appendHex(StringBuffer paramStringBuffer, byte paramByte) { paramStringBuffer.append("0123456789ABCDEF".charAt(paramByte >> 4 & 0xF)) .append("0123456789ABCDEF".charAt(paramByte & 0xF)); }
From source file:Main.java
private static void appendHex(StringBuffer sb, byte b) { sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f)); }
From source file:Main.java
public static String addSetString(String fieldName) { if (fieldName.startsWith("is")) { return fieldName.replace("is", "set"); }//from www .j av a 2s. co m StringBuffer sb = new StringBuffer(); sb.append("set"); sb.append(fieldName.substring(0, 1).toUpperCase()); sb.append(fieldName.substring(1)); return sb.toString(); }
From source file:Main.java
public static String nsElement(String p_namespace, String p_elem_name) { StringBuffer l_buf = new StringBuffer(); l_buf.append(p_namespace).append(":").append(p_elem_name); return l_buf.toString(); }
From source file:Main.java
public static String getTimeForm(long milliseconds) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(milliseconds);/*from w w w. jav a2 s.co m*/ StringBuffer sb = new StringBuffer(); sb.append(c.get(c.YEAR)).append("-").append(c.get(c.MONTH) + 1).append("-").append(c.get(c.DAY_OF_MONTH)) .append(" ").append(c.get(c.HOUR_OF_DAY)).append(":").append(c.get(c.MINUTE)); return sb.toString(); }