com.cc.framework.util.parser.formatter
Class DefaultHandler

java.lang.Object
  extended bycom.cc.framework.util.parser.formatter.DefaultHandler
All Implemented Interfaces:
HtmlHandler, JspHandler
Direct Known Subclasses:
HtmlFormatterHandler

public class DefaultHandler
extends java.lang.Object
implements HtmlHandler, JspHandler

This handler is used to create HTML

Author:
P001002

Field Summary
private  java.io.PrintWriter out
          Result buffer
 
Fields inherited from interface com.cc.framework.util.parser.HtmlHandler
JSP_DECLARATION, JSP_EXPRESSION, JSP_SCRIPT, M_CLOSING, M_INLINE, M_OPENING
 
Constructor Summary
DefaultHandler(java.io.OutputStream out)
          Constructor
 
Method Summary
 void handleCharacters(char[] ch, int start, int length)
          Is called to process CDATA
 void handleComment(char[] ch, int start, int length)
          Is called to process a HTML comment
 void handleDocument(int mode)
          Is called at the beginning or the end of the document
 void handleElement(java.lang.String name, HtmlAttributes attributes, int mode)
          Is called at the beginning or the end of an element
 void handleEntity(java.lang.String entity, char character)
          Is called to process an entity
 void handleJspComment(char[] ch, int start, int length)
          Is called to process a JSP comment
 void handleJspDirective(java.lang.String directive, HtmlAttributes attributes)
          Is called for a JSP directive
 void handleJspScriptlet(int type, char[] ch, int start, int length)
          Is called to process a JSP scriptlet
protected  void print(char ch)
           
protected  void print(char[] ch, int start, int length)
           
protected  void print(java.lang.String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private java.io.PrintWriter out
Result buffer

Constructor Detail

DefaultHandler

public DefaultHandler(java.io.OutputStream out)
Constructor

Parameters:
out - the output stream
Method Detail

print

protected void print(char ch)

print

protected void print(java.lang.String str)

print

protected void print(char[] ch,
                     int start,
                     int length)

handleDocument

public void handleDocument(int mode)
Description copied from interface: HtmlHandler
Is called at the beginning or the end of the document

Specified by:
handleDocument in interface HtmlHandler
Parameters:
mode - one of the M_xxx constants
See Also:
HtmlHandler.handleDocument(int)

handleElement

public void handleElement(java.lang.String name,
                          HtmlAttributes attributes,
                          int mode)
Description copied from interface: HtmlHandler
Is called at the beginning or the end of an element

Specified by:
handleElement in interface HtmlHandler
Parameters:
name - the element name
attributes - the attribute list of the element
mode - one of the M_xxx constants
See Also:
HtmlHandler.handleElement(java.lang.String, com.cc.framework.util.parser.HtmlAttributes, int)

handleEntity

public void handleEntity(java.lang.String entity,
                         char character)
Description copied from interface: HtmlHandler
Is called to process an entity

Specified by:
handleEntity in interface HtmlHandler
Parameters:
entity - the entity name (with '&' and ';')
character - the corresponding character code
See Also:
HtmlHandler.handleEntity(java.lang.String, char)

handleCharacters

public void handleCharacters(char[] ch,
                             int start,
                             int length)
Description copied from interface: HtmlHandler
Is called to process CDATA

Specified by:
handleCharacters in interface HtmlHandler
Parameters:
ch - the character buffer
start - the starting index within the buffer
length - the number of characters
See Also:
HtmlHandler.handleCharacters(char[], int, int)

handleComment

public void handleComment(char[] ch,
                          int start,
                          int length)
Description copied from interface: HtmlHandler
Is called to process a HTML comment

Specified by:
handleComment in interface HtmlHandler
Parameters:
ch - the character buffer
start - the starting index within the buffer
length - the number of characters
See Also:
HtmlHandler.handleComment(char[], int, int)

handleJspComment

public void handleJspComment(char[] ch,
                             int start,
                             int length)
Description copied from interface: JspHandler
Is called to process a JSP comment

Specified by:
handleJspComment in interface JspHandler
Parameters:
ch - the character buffer
start - the starting index within the buffer
length - the number of characters
See Also:
JspHandler.handleJspComment(char[], int, int)

handleJspScriptlet

public void handleJspScriptlet(int type,
                               char[] ch,
                               int start,
                               int length)
Description copied from interface: JspHandler
Is called to process a JSP scriptlet

Specified by:
handleJspScriptlet in interface JspHandler
Parameters:
type - the type of the scriptlet (JSP_xxxx)
ch - the character buffer
start - the starting index within the buffer
length - the number of characters
See Also:
JspHandler.handleJspScriptlet(int, char[], int, int)

handleJspDirective

public void handleJspDirective(java.lang.String directive,
                               HtmlAttributes attributes)
Description copied from interface: JspHandler
Is called for a JSP directive

Specified by:
handleJspDirective in interface JspHandler
Parameters:
directive - the directive name
attributes - the attribute list of the element
See Also:
JspHandler.handleJspDirective(java.lang.String, com.cc.framework.util.parser.HtmlAttributes)


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.