public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }