Devsphere.com


com.devsphere.examples.xml.saxdomix
Class OutputterBase

java.lang.Object
  |
  +--com.devsphere.examples.xml.saxdomix.OutputterBase
Direct Known Subclasses:
DOMOutputter, SAXOutputter

public abstract class OutputterBase
extends java.lang.Object

Base class for SAXOutputter and DOMOutputter.

See Also:
SAXOutputter, DOMOutputter

Field Summary
static int DEFAULT_MAX_DATA_LENGTH
          Default value for maxDataLength
protected  int level
          The current indenting level
protected  int maxDataLength
          Data strings longer than this value are truncated before printing
 
Constructor Summary
OutputterBase()
          Zero-arg constructor.
OutputterBase(int level)
          Constructor that takes as parameter the initial level.
OutputterBase(int level, int maxDataLength)
          Constructor that takes as parameter the initial level and the value for the maxDataLength property.
 
Method Summary
 void blankLine()
          Prints a blank line.
 void decLevel()
          Decrements the indenting level.
 int getLevel()
          Gets the indenting level.
 int getMaxDataLength()
          Gets the value of the maxDataLength property.
 void incLevel()
          Increments the indenting level.
 void output(java.lang.String info)
          Outputs an information
 void output(java.lang.String info, java.lang.String data)
          Outputs an information followed by a data string
 void setLevel(int level)
          Sets the indenting level.
 void setMaxDataLength(int maxDataLength)
          Sets the value of the maxDataLength property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_DATA_LENGTH

public static final int DEFAULT_MAX_DATA_LENGTH
Default value for maxDataLength

See Also:
Constant Field Values

maxDataLength

protected int maxDataLength
Data strings longer than this value are truncated before printing


level

protected int level
The current indenting level

Constructor Detail

OutputterBase

public OutputterBase()
Zero-arg constructor.


OutputterBase

public OutputterBase(int level)
Constructor that takes as parameter the initial level.


OutputterBase

public OutputterBase(int level,
                     int maxDataLength)
Constructor that takes as parameter the initial level and the value for the maxDataLength property.

Method Detail

setLevel

public void setLevel(int level)
Sets the indenting level.


getLevel

public int getLevel()
Gets the indenting level.


incLevel

public void incLevel()
Increments the indenting level.


decLevel

public void decLevel()
Decrements the indenting level.


setMaxDataLength

public void setMaxDataLength(int maxDataLength)
Sets the value of the maxDataLength property.


getMaxDataLength

public int getMaxDataLength()
Gets the value of the maxDataLength property.


blankLine

public void blankLine()
Prints a blank line.


output

public void output(java.lang.String info)
Outputs an information


output

public void output(java.lang.String info,
                   java.lang.String data)
Outputs an information followed by a data string


 Devsphere.com