Java tutorial
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.io.IOException; public class Main { /** * Wraps an xm tag with '</' and '>'. * * @param tag the XML tag to wrap with '</' and '>' * @param buf the {@code Appendable} to which to append the start tag * @throws IOException from {@code Appendable} (but {@code StringBuffer} or * {@code StringBuilder} will never actually throw {@code IOException}) * @since 2.4 */ public static void xmlAppendEndTag(String tag, Appendable buf) throws IOException { buf.append("</"); buf.append(tag); buf.append(">\n"); } }