Append the preamble
@param util an util
@param appendable the destination
@throws IOException if an I/O error occurs
967806
public void appendPreamble(final XMLUtil util, final Appendable appendable) throws IOException {
        if (this.preambleWritten)
            return;

        appendable.append("<table:table");
        util.appendEAttribute(appendable, "table:name", this.builder.getName());
        util.appendEAttribute(appendable, "table:style-name",
                this.builder.getStyleName());
        util.appendAttribute(appendable, "table:print", false);
        appendable.append("><office:forms");
        util.appendAttribute(appendable, "form:automatic-focus", false);
        util.appendAttribute(appendable, "form:apply-design-mode", false);
        appendable.append("/>");
        this.appendColumnStyles(this.builder.getColumnStyles(), appendable, util);
        this.preambleWritten = true;
    }
207520
public <A extends Appendable> A appendTo(A appendable, Map<?, ? extends Collection<?>> map) throws IOException {
		return appendTo(appendable, map.entrySet());
	}
891358
public void writePreamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
        writer.putNextEntry(new ZipEntry("content.xml"));
        writer.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
        writer.write(
                "<office:document-content xmlns:office=\"urn:oasis:names:tc:opendocument:xmlns:office:1.0\" " + "xmlns:style=\"urn:oasis:names:tc:opendocument:xmlns:style:1.0\" " + "xmlns:text=\"urn:oasis:names:tc:opendocument:xmlns:text:1.0\" " + "xmlns:table=\"urn:oasis:names:tc:opendocument:xmlns:table:1.0\" " + "xmlns:draw=\"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\" " + "xmlns:fo=\"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\" " + "xmlns:xlink=\"http://www.w3.org/1999/xlink\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" " + "xmlns:meta=\"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\" " + "xmlns:number=\"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\" " + "xmlns:presentation=\"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\" " + "xmlns:svg=\"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\" " + "xmlns:chart=\"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\" " + "xmlns:dr3d=\"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\" xmlns:math=\"http://www" + ".w3.org/1998/Math/MathML\" xmlns:form=\"urn:oasis:names:tc:opendocument:xmlns:form:1.0\" " + "xmlns:script=\"urn:oasis:names:tc:opendocument:xmlns:script:1.0\" " + "xmlns:ooo=\"http://openoffice.org/2004/office\" xmlns:ooow=\"http://openoffice" + ".org/2004/writer\" xmlns:oooc=\"http://openoffice.org/2004/calc\" xmlns:dom=\"http://www" + ".w3.org/2001/xml-events\" xmlns:xforms=\"http://www.w3.org/2002/xforms\" " + "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www" + ".w3.org/2001/XMLSchema-instance\" office:version=\"1.1\">");
        writer.write("<office:scripts/>");
        this.stylesContainer.writeFontFaceDecls(util, writer);
        writer.write("<office:automatic-styles>");
        this.stylesContainer.writeHiddenDataStyles(util, writer);
        this.stylesContainer.writeContentAutomaticStyles(util, writer);
        writer.write("</office:automatic-styles>");
        writer.write("<office:body>");
        writer.write("<office:spreadsheet>");
    }
1030897
private static void appendUNTIL(Writer writer, String until) throws IOException {
        if (until != null) {
            writer.write(SEMICOLON);
            writer.write(ICAL_UNTIL);
            writer.write(EQUALS_SIGN);
            writer.write(until);
        }
    }
397567
@Override
	final public void writeSuffixTo(Appendable out) throws IOException {
		writeSuffix(buffer, out);
		buffer.setLength(0);
	}
557717
public synchronized static void append(File file,String content) throws IOException {
        Writer writer = writerCache.getOrDefault(file.getPath(), new FileWriter(file,true));
        writer.write(content);
        writer.flush();
        writerCache.put(file.getPath(), writer);
    }
730894
private static void appendResult(int result, Appendable dest,
            int cpLength, int options, Edits edits) throws IOException {
        // Decode the result.
        if (result < 0) {
            // (not) original code point
            if (edits != null) {
                edits.addUnchanged(cpLength);
                if ((options & OMIT_UNCHANGED_TEXT) != 0) {
                    return;
                }
            }
            appendCodePoint(dest, ~result);
        } else if (result <= UCaseProps.MAX_STRING_LENGTH) {
            // The mapping has already been appended to result.
            if (edits != null) {
                edits.addReplace(cpLength, result);
            }
        } else {
            // Append the single-code point mapping.
            int length = appendCodePoint(dest, result);
            if (edits != null) {
                edits.addReplace(cpLength, length);
            }
        }
    }
601702
public void flushAllAvailableRows(final XMLUtil util, final Appendable appendable)
            throws IOException {
        this.appender.flushAllAvailableRows(util, appendable);
    }
326554
public void appendXMLToAutomaticStyle(final XMLUtil util,
										  final Appendable appendable) throws IOException {
		appendable.append("<style:page-layout");
		util.appendEAttribute(appendable, "style:name", this.name);
		appendable.append("><style:page-layout-properties");
		util.appendAttribute(appendable, "fo:page-width", this.pageWidth.toString());
		util.appendAttribute(appendable, "fo:page-height", this.pageHeight.toString());
		util.appendEAttribute(appendable, "style:num-format", this.numFormat);
		util.appendAttribute(appendable, "style:writing-mode",
				this.writingMode.getAttrValue());
		util.appendAttribute(appendable, "style:print-orientation",
				this.printOrientation.getAttrValue());
		this.appendBackgroundColor(util, appendable);
		this.margins.appendXMLContent(util, appendable);
		appendable.append("/>"); // End of page-layout-properties

		PageSection
				.appendPageSectionStyleXMLToAutomaticStyle(this.header, util, appendable);
		PageSection
				.appendPageSectionStyleXMLToAutomaticStyle(this.footer, util, appendable);
		appendable.append("</style:page-layout>");
	}
595583
public void appendLVAttributes(final XMLUtil util,
									  final Appendable appendable) throws IOException {
		this.appendLocaleAttributes(util, appendable);
		this.appendVolatileAttribute(util, appendable);
	}
398683
public FSDataOutputStream append(Path f, int bufferSize) throws IOException {
    return append(f, bufferSize, null);
  }
442050
void append(final MultiIndex.Action action) throws IOException
   {
      initOut();
      out.write(action.toString() + "\n");
      entryCount++;
   }
818761
public FormattedStringBuilder append(Throwable t) { 
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        PrintStream p = new PrintStream(os);
        t.printStackTrace(p);
        p.close();
        return append(os.toString());
    }
374216
public void appendXMLToAutomaticStyle(final XMLUtil util,
										  final Appendable appendable) throws IOException {
		this.pageLayoutStyle.appendXMLToAutomaticStyle(util, appendable);
	}
163948
public void appendXMLToTable(final XMLUtil util, final Appendable appendable) throws IOException {
        this.appendRowOpenTag(util, appendable);
        int nullFieldCounter = 0;

        final int size = this.cells.usedSize();
        for (int c = 0; c < size; c++) {
            final TableCell cell = this.cells.get(c);
            if (this.hasNoValue(cell)) {
                nullFieldCounter++;
                continue;
            }
            this.appendRepeatedCell(util, appendable, nullFieldCounter);
            nullFieldCounter = 0;
            cell.appendXMLToTableRow(util, appendable);
        }

        appendable.append("</table:table-row>");
    }
421516
public static void append(File file, Object text) throws IOException {
        append(file, text, false);
    }
1310809
public void flushSomeAvailableRowsFrom(final XMLUtil util, final Appendable appendable, final int rowIndex)
            throws IOException {
        if (rowIndex == 0)
            this.appendPreamble(util, appendable);
        this.appendRows(util, appendable, rowIndex);
    }