com.isti.util
Class IstiXMLOutputter

java.lang.Object
  extended by XMLOutputter
      extended by com.isti.util.IstiXMLOutputter

public class IstiXMLOutputter
extends XMLOutputter

Class IstiXMLOutputter extends the 'XMLOutputter' class to add additional functionality.


Field Summary
static java.lang.String DEFAULT_ENCODING_FORMAT
          Default encoding.
 
Constructor Summary
IstiXMLOutputter()
          This will create an XMLOutputter with no additional whitespace (indent or newlines) added; the whitespace from the element text content is fully preserved.
IstiXMLOutputter(java.lang.String encoding)
          This will create an XMLOutputter with no additional whitespace (indent or newlines) added; the whitespace from the element text content is fully preserved.
 
Method Summary
 java.lang.String getEncodedString(java.lang.String s)
          Gets the encoded string using the current encoding.
 void setEncoding(java.lang.String encoding)
          Sets the output encoding.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ENCODING_FORMAT

public static final java.lang.String DEFAULT_ENCODING_FORMAT
Default encoding. This may be used for the XMLOutputter.setEncoding() method.

See Also:
Constant Field Values
Constructor Detail

IstiXMLOutputter

public IstiXMLOutputter()
This will create an XMLOutputter with no additional whitespace (indent or newlines) added; the whitespace from the element text content is fully preserved.


IstiXMLOutputter

public IstiXMLOutputter(java.lang.String encoding)
This will create an XMLOutputter with no additional whitespace (indent or newlines) added; the whitespace from the element text content is fully preserved.

Parameters:
encoding - set encoding format. Use XML-style names like "UTF-8" or "ISO-8859-1" or "US-ASCII" (see setEncoding(java.lang.String)).
Method Detail

getEncodedString

public java.lang.String getEncodedString(java.lang.String s)
Gets the encoded string using the current encoding.

Parameters:
s - the string to encode.
Returns:
the encoded string or the original string if an error occurs. (see setEncoding(java.lang.String)).

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the output encoding. The name should be an accepted XML encoding.

Parameters:
encoding - the encoding format. Use XML-style names like "UTF-8" or "ISO-8859-1" or "US-ASCII" (see #makeWriter).