com.jclark.xsl.sax
Class GenericDestination

java.lang.Object
  extended by com.jclark.xsl.sax.GenericDestination
All Implemented Interfaces:
Destination
Direct Known Subclasses:
FileDescriptorDestination, FileDestination, OutputStreamDestination, ServletDestination

public abstract class GenericDestination
extends java.lang.Object
implements Destination

A base class for output Destinations, providing some common default behaviors


Constructor Summary
GenericDestination()
           
 
Method Summary
 java.lang.String getEncoding()
          returns the IANA character encoding name
 java.io.Writer getWriter(java.lang.String contentType, java.lang.String encoding)
          get a Writer for an OutputHandler to write characters to our default behavior is to construct a new Writer around the OutputStream associated with this Destination.
 boolean keepOpen()
          determines whether the output stream should be closed when the transformation is completed.
 Destination resolve(java.lang.String uri)
          By default return a FileDestination to the given (local) URI
protected  void setEncoding(java.lang.String encoding)
          sets the IANA character encoding name from a Java character encoding name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jclark.xsl.sax.Destination
getOutputStream
 

Constructor Detail

GenericDestination

public GenericDestination()
Method Detail

getEncoding

public java.lang.String getEncoding()
returns the IANA character encoding name

Specified by:
getEncoding in interface Destination

setEncoding

protected void setEncoding(java.lang.String encoding)
sets the IANA character encoding name from a Java character encoding name.


keepOpen

public boolean keepOpen()
determines whether the output stream should be closed when the transformation is completed. The default value is true

Specified by:
keepOpen in interface Destination

getWriter

public java.io.Writer getWriter(java.lang.String contentType,
                                java.lang.String encoding)
                         throws java.io.IOException,
                                java.io.UnsupportedEncodingException
get a Writer for an OutputHandler to write characters to our default behavior is to construct a new Writer around the OutputStream associated with this Destination.

Specified by:
getWriter in interface Destination
Throws:
java.io.IOException
java.io.UnsupportedEncodingException

resolve

public Destination resolve(java.lang.String uri)
By default return a FileDestination to the given (local) URI

Specified by:
resolve in interface Destination