Top Description Constructors Methods
uk.ac.ed.ph.snuggletex.utilities

public final Class CSSUtilities

extends Object
Class Inheritance
Imports
uk.ac.ed.ph.snuggletex.DOMOutputOptions, .SnuggleRuntimeException, uk.ac.ed.ph.snuggletex.definitions.Globals, uk.ac.ed.ph.snuggletex.internal.util.IOUtilities, java.io.BufferedWriter, .File, .FileNotFoundException, .FileOutputStream, .IOException, .OutputStream, .OutputStreamWriter, .PrintWriter, .StringWriter, .Writer, java.nio.charset.Charset, java.util.Properties, .Map.Entry

Some handy utility methods for managing SnuggleTeX CSS.
Author
David McKain
Version
$Revision$

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static void
main(String[]
Array containing 1 argument: the File that the default CSS should be written to. Any parent directories will be created as required.
args
)

Main method is used by the build process to write out the default CSS stylesheet.

public static Properties
readBuiltinInlineCSSProperties()

Reads in the default CSS Properties file, which is packaged within SnuggleTeX itself.

public static Properties
readInlineCSSProperties(DOMOutputOptions options)

Reads in the custom CSS Properties Object specified by the given DOMOutputOptions.

public static String
writeDefaultStylesheet()

Writes out the "default" CSS stylesheet specified via readBuiltinInlineCSSProperties(), returning the result as a String.

public static void
writeDefaultStylesheet(OutputStream cssOutputStream)

Writes out the "default" CSS stylesheet specified via readBuiltinInlineCSSProperties(), saving the results to the given OutputStream.

public static void
writeStylesheet(DOMOutputOptions options, OutputStream cssOutputStream)

Writes out the CSS stylesheet specified via the given DOMOutputOptions Object, using the default if nothing has been specified, saving the results to the given OutputStream.

public static String
writeStylesheet(Properties cssProperties)

Writes out the CSS stylesheet made from the given cssProperties, returning the result as a String.

public static void
writeStylesheet(Properties cssProperties, OutputStream cssOutputStream)

Writes out the CSS stylesheet made from the given cssProperties, saving the results to the given OutputStream.

public static void
writeStylesheet(Properties cssProperties, Writer cssOutputWriter)

Writes out the CSS stylesheet made from the given cssProperties, saving the results to the given Writer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CSSUtilitiesback to summary
public CSSUtilities()

Method Detail

mainback to summary
public static void main(String[] args) throws IOException

Main method is used by the build process to write out the default CSS stylesheet.

Parameters
args:String[]

Array containing 1 argument: the File that the default CSS should be written to. Any parent directories will be created as required.

readBuiltinInlineCSSPropertiesback to summary
public static Properties readBuiltinInlineCSSProperties()

Reads in the default CSS Properties file, which is packaged within SnuggleTeX itself.

readInlineCSSPropertiesback to summary
public static Properties readInlineCSSProperties(DOMOutputOptions options)

Reads in the custom CSS Properties Object specified by the given DOMOutputOptions. If nothing has been supplied, then it reads in the default CSS Properties via readBuiltinInlineCSSProperties() as a fallback.

writeDefaultStylesheetback to summary
public static String writeDefaultStylesheet()

Writes out the "default" CSS stylesheet specified via readBuiltinInlineCSSProperties(), returning the result as a String.

writeDefaultStylesheetback to summary
public static void writeDefaultStylesheet(OutputStream cssOutputStream)

Writes out the "default" CSS stylesheet specified via readBuiltinInlineCSSProperties(), saving the results to the given OutputStream.

writeStylesheetback to summary
public static void writeStylesheet(DOMOutputOptions options, OutputStream cssOutputStream)

Writes out the CSS stylesheet specified via the given DOMOutputOptions Object, using the default if nothing has been specified, saving the results to the given OutputStream.

writeStylesheetback to summary
public static String writeStylesheet(Properties cssProperties)

Writes out the CSS stylesheet made from the given cssProperties, returning the result as a String.

writeStylesheetback to summary
public static void writeStylesheet(Properties cssProperties, OutputStream cssOutputStream)

Writes out the CSS stylesheet made from the given cssProperties, saving the results to the given OutputStream.

writeStylesheetback to summary
public static void writeStylesheet(Properties cssProperties, Writer cssOutputWriter)

Writes out the CSS stylesheet made from the given cssProperties, saving the results to the given Writer.