Write master page styles. The master page style always belong to to styles
.xml/master-styles (3.15.4)

@param util   an util
@param appendable the destination
@throws IOException if an I/O error occurs
773436
public void writeMasterPageStyles(final XMLUtil util, final Appendable appendable)
            throws IOException {
        for (final MasterPageStyle ps : this.masterPageStylesContainer.getValues()) {
            ps.appendXMLToMasterStyle(util, appendable);
        }
    }
809446
public static void writeHtmlColor(int color, Appendable out) throws IOException {
		out.append('#');
		out.append(getHex(color>>>20));
		out.append(getHex(color>>>16));
		out.append(getHex(color>>>12));
		out.append(getHex(color>>>8));
		out.append(getHex(color>>>4));
		out.append(getHex(color));
	}
1302669
public static void writeJSON(Map<String, ? extends Object> map, Appendable out, JSONStyle compression)
			throws IOException {
		if (map == null) {
			out.append("null");
			return;
		}
		JsonWriter.JSONMapWriter.writeJSONString(map, out, compression);
	}
599902
public void flushRemainingRowsFrom(final XMLUtil util, final Appendable appendable, final int rowIndex)
            throws IOException {
        if (rowIndex == 0)
            this.appendPreamble(util, appendable);
        this.appendRows(util, appendable, rowIndex);
        this.appendPostamble(appendable);
    }
429619
@Override
	protected File writeFileContent( String fileContent ) throws IOException {

		// Load the template
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		InputStream in = getClass().getResourceAsStream( "/html.tpl" );
		Utils.copyStreamSafely( in, out );

		// Create the target directory
		File targetFile = new File( this.outputDirectory, "index.html" );
		Utils.createDirectory( targetFile.getParentFile());

		// Deal with the CSS file
		final String css;
		final String cssReference = this.options.get( DocConstants.OPTION_HTML_CSS_REFERENCE );
		if( cssReference != null ) {
			css = cssReference.trim();

		} else {
			css = "style.css";
			writeCssFile();
		}

		// Write sections
		for( Map.Entry<String,StringBuilder> entry : this.sectionNameToContent.entrySet()) {

			int index = entry.getKey().lastIndexOf( '/' );
			String title = entry.getKey().substring( index + 1 );
			String toWrite = out.toString( "UTF-8" )
					.replace( TITLE_MARKUP, title )
					.replace( CONTENT_MARKUP, entry.getValue().toString())
					.replace( MENU_MARKUP, this.menu )
					.replace( "href=\"", "href=\"../" )
					.replace( "src=\"", "src=\"../" )
					.replaceAll( "\n{3,}", "\n\n" );

			if( cssReference != null )
				toWrite = toWrite.replace( "../" + CSS_MARKUP, css );
			else
				toWrite = toWrite.replace( CSS_MARKUP, css );

			File sectionFile = new File( this.outputDirectory, entry.getKey() + ".html" );
			Utils.createDirectory( sectionFile.getParentFile());
			Utils.writeStringInto( toWrite, sectionFile );
		}

		// Write the main file
		String toWrite = out.toString( "UTF-8" )
				.replace( TITLE_MARKUP, this.applicationTemplate.getName())
				.replace( CSS_MARKUP, css )
				.replace( CONTENT_MARKUP, fileContent )
				.replace( MENU_MARKUP, this.menu )
				.replaceAll( "\n{3,}", "\n\n" );

		Utils.writeStringInto( toWrite, targetFile );

		// And the header image
		String imagePath = this.options.get( DocConstants.OPTION_HTML_HEADER_IMAGE_FILE );
		try {
			File sourceFile = null;
			if( imagePath != null )
				sourceFile = new File( imagePath );

			if( sourceFile != null && sourceFile.exists())
				in = new FileInputStream( sourceFile );
			else
				in = getClass().getResourceAsStream( "/roboconf.jpg" );

			File imgFile = new File( this.outputDirectory, "header.jpg" );
			Utils.copyStream( in, imgFile );

		} finally {
			Utils.closeQuietly( in );
		}

		return targetFile;
	}
595583
public void appendLVAttributes(final XMLUtil util,
									  final Appendable appendable) throws IOException {
		this.appendLocaleAttributes(util, appendable);
		this.appendVolatileAttribute(util, appendable);
	}
601702
public void flushAllAvailableRows(final XMLUtil util, final Appendable appendable)
            throws IOException {
        this.appender.flushAllAvailableRows(util, appendable);
    }
1067436
public boolean addMasterPageStyle(final MasterPageStyle masterPageStyle) {
        if (this.masterPageStylesContainer.add(masterPageStyle.getName(), masterPageStyle)) {
            masterPageStyle.addEmbeddedStyles(this);
            return true;
        } else return false;
    }
705053
protected void indent(Appendable app, int indentLevel) throws IOException {
        for (int i=0; i<indentLevel; i++) {
            app.append(' ');
        }
    }
567291
private void writeTop() throws IOException {
        // setup output HTML file
        File outputFile = new File(outputDirectory, createFilename(currentPageNumber));
        writer = new BufferedWriter(new OutputStreamWriter(
                new FileOutputStream(outputFile, false), Charset.forName(encoding)));

        // write header
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("pageTitle", pageTitle);
        if(pageHeader != null && pageHeader.length() > 0) {
            map.put("header", "<h1>" + pageHeader + "</h1>");
        } else {
            map.put("header","");
        }
        if(pageDescription != null && pageDescription.length() > 0) {
            map.put("description", "<p>" + pageDescription + "</p>");
        } else {
            map.put("description", "");
        }

        String template = Template.readResourceAsStream("com/btaz/util/templates/html-table-header.ftl");
        String output = Template.transform(template, map);
        writer.write(output);
    }
1199396
public void writeContent(final OutputStream result) throws IOException
    {
        if(this.borderStyle == BORDER_NONE || this.borderPosition == NO_BORDER || this.borderWidth == 0) {
            return;
        }

    	if(this.borderType == ROW_BORDER) {
            switch(this.borderPosition) {
                case LEFT_BORDER:
                    result.write(ROW_BORDER_LEFT);
                	break;
                case TOP_BORDER:
                    result.write(ROW_BORDER_TOP);
                    break;
                case RIGHT_BORDER:
                    result.write(ROW_BORDER_RIGHT);
                    break;
                case BOTTOM_BORDER:
                    result.write(ROW_BORDER_BOTTOM);
                    break;
                case HORIZONTAL_BORDER:
                    result.write(ROW_BORDER_HORIZONTAL);
                    break;
                case VERTICAL_BORDER:
                    result.write(ROW_BORDER_VERTICAL);
                    break;
                default:
                    return;
            }
            result.write(writeBorderStyle());
            result.write(BORDER_WIDTH);
            result.write(intToByteArray(this.borderWidth));
            result.write(BORDER_COLOR_NUMBER);
            result.write(intToByteArray(this.borderColor.getColorNumber()));
            this.document.outputDebugLinebreak(result);
        } else if(this.borderType == CELL_BORDER) {
            switch(this.borderPosition) {
                case LEFT_BORDER:
                    result.write(CELL_BORDER_LEFT);
                	break;
                case TOP_BORDER:
                    result.write(CELL_BORDER_TOP);
                    break;
                case RIGHT_BORDER:
                    result.write(CELL_BORDER_RIGHT);
                    break;
                case BOTTOM_BORDER:
                    result.write(CELL_BORDER_BOTTOM);
                    break;
                default:
                    return;
            }
            result.write(writeBorderStyle());
            result.write(BORDER_WIDTH);
            result.write(intToByteArray(this.borderWidth));
            result.write(BORDER_COLOR_NUMBER);
            result.write(intToByteArray(this.borderColor.getColorNumber()));
            this.document.outputDebugLinebreak(result);
        }    	
    }
1296673
protected void writeHeader(Meta meta) throws IOException {
        addTabs(2);
        writeStart(HtmlTags.META);
        switch(meta.type()) {
            case Element.HEADER:
                write(HtmlTags.NAME, ((Header) meta).getName());
                break;
            case Element.SUBJECT:
                write(HtmlTags.NAME, HtmlTags.SUBJECT);
                break;
            case Element.KEYWORDS:
                write(HtmlTags.NAME, HtmlTags.KEYWORDS);
                break;
            case Element.AUTHOR:
                write(HtmlTags.NAME, HtmlTags.AUTHOR);
                break;
        }
        write(HtmlTags.CONTENT, HtmlEncoder.encode(meta.getContent()));
        writeEnd();
    }
590513
public static <N, E> void write(Graph<N, E> graph, Appendable a) throws IOException {
        writeRaw(graph, a, toDOTVisualizationHelper(graph.getVisualizationHelper()));
    }
242026
public void writePostamble(final XMLUtil util, final ZipUTF8Writer writer) throws IOException {
        if (this.autofilters != null) this.appendAutofilters(writer, util);
        writer.write("</office:spreadsheet>");
        writer.write("</office:body>");
        writer.write("</office:document-content>");
        writer.flush();
        writer.closeEntry();
    }
482497
public void write(Writer out)
         throws IOException
    {
        writeHtmlHead(out);
        
        out.write("<frameset "+border);
        
        if(colSpec!=null)
            out.write(" cols=\""+colSpec+"\"");
        if(rowSpec!=null)
            out.write(" rows=\""+rowSpec+"\"");
        out.write(">");

        for(int r=0;r<rows;r++)
            for(int c=0;c<cols;c++)
                frames[c][r].write(out);

        out.write("<noframes>");
        writeElements(out);
        out.write("</noframes>");

        out.write("</frameset>");
        out.write("</html>");
    }
1360470
public final <A extends Appendable> A appendTo(A appendable, Object[] parts) throws IOException {
    return appendTo(appendable, Arrays.asList(parts));
  }
256846
private void appendLine(final String... fields) throws IORuntimeException {
		try {
			doAppendLine(fields);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}