Code example for BufferedWriter

Methods: write

0
            unicode = true;
        } 
    } 
 
    public void startDocument(String encoding, Boolean standalone) throws IOException {
        writer.write("<?xml version='1.0' ");
 
        if (encoding != null) {
            this.encoding = encoding;
            if (encoding.toLowerCase(Locale.US).startsWith("utf")) {
                unicode = true;
            } 
        } 
 
        if (this.encoding != null) {
            writer.write("encoding='");
            writer.write(this.encoding);
            writer.write("' ");
        } 
 
        if (standalone != null) {
            writer.write("standalone='");
            writer.write(
                    standalone.booleanValue() ? "yes" : "no");
            writer.write("' ");
        } 
        writer.write("?>");
    } 
 
    public XmlSerializer startTag(String namespace, String name)
            throws IOException { 
        check(false);