org.zkoss.zuss
Class Zuss

java.lang.Object
  extended by org.zkoss.zuss.Zuss

public class Zuss
extends java.lang.Object

The ZUSS utilities.

Author:
tomyeh

Constructor Summary
Zuss()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static ZussDefinition parse(java.io.File file, java.lang.String charset)
          Parses from the given file.
static ZussDefinition parse(java.io.InputStream in, java.lang.String charset, Locator loc, java.lang.String filename)
          Parses from the given input stream.
static ZussDefinition parse(java.io.Reader in, Locator loc, java.lang.String filename)
          Parses from the given reader.
static void translate(ZussDefinition def, java.io.File file, java.lang.String charset, Resolver resolver)
          Translate ZUSS to CSS, and store to the gieven file based on the given ZUL style sheet.
static void translate(ZussDefinition def, java.io.OutputStream out, java.lang.String charset, Resolver resolver)
          Translate ZUSS to CSS, and store CSS to the gieven output based on the given ZUL style sheet.
static void translate(ZussDefinition def, java.io.Writer out, Resolver resolver)
          Translate ZUSS to CSS, and store to the gieven output based on the given ZUL style sheet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Zuss

public Zuss()
Method Detail

parse

public static ZussDefinition parse(java.io.File file,
                                   java.lang.String charset)
                            throws java.io.IOException
Parses from the given file.

Parameters:
file - the input stream to read ZUSS from
charset - the encoding used in the input stream, such as "UTF-8". If null, the system default is used.
Throws:
java.io.IOException

parse

public static ZussDefinition parse(java.io.InputStream in,
                                   java.lang.String charset,
                                   Locator loc,
                                   java.lang.String filename)
                            throws java.io.IOException
Parses from the given input stream.

Parameters:
in - the input stream to read ZUSS from
charset - the encoding used in the file, such as "UTF-8". If null, the system default is used.
loc - the locator used to locate the resource included by @include. It can't be null if @include is used.
filename - the ZUSS's filename. It is used only to display the error message. Ignored if null.
Throws:
java.io.IOException

parse

public static ZussDefinition parse(java.io.Reader in,
                                   Locator loc,
                                   java.lang.String filename)
                            throws java.io.IOException
Parses from the given reader.

Parameters:
in - the reader to read ZUSS from
loc - the locator used to locate the resource included by @include. It can't be null if @include is used.
filename - the ZUSS's filename. It is used only to display the error message. Ignored if null.
Throws:
java.io.IOException

translate

public static void translate(ZussDefinition def,
                             java.io.File file,
                             java.lang.String charset,
                             Resolver resolver)
                      throws java.io.IOException
Translate ZUSS to CSS, and store to the gieven file based on the given ZUL style sheet.

Notice that if the file exists, it will be overwritten.

Parameters:
def - the ZUL style style (source)
file - the file to store the generated CSS content.
charset - the encoding used in the file, such as "UTF-8". If null, the system default is used.
resolver - the custom variable and function resolver. Ignored if null.
Throws:
java.io.IOException

translate

public static void translate(ZussDefinition def,
                             java.io.OutputStream out,
                             java.lang.String charset,
                             Resolver resolver)
                      throws java.io.IOException
Translate ZUSS to CSS, and store CSS to the gieven output based on the given ZUL style sheet.

Parameters:
def - the ZUL style style (source)
out - the output stream to store the generated CSS content.
charset - the encoding used in the file, such as "UTF-8". If null, the system default is used.
resolver - the custom variable and function resolver. Ignored if null.
Throws:
java.io.IOException

translate

public static void translate(ZussDefinition def,
                             java.io.Writer out,
                             Resolver resolver)
                      throws java.io.IOException
Translate ZUSS to CSS, and store to the gieven output based on the given ZUL style sheet.

Parameters:
def - the ZUL style style (source)
out - the writer to store the generated CSS content.
resolver - the custom variable and function resolver. Ignored if null.
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2005-2010 Potix Corporation. All Rights Reserved.