com.jclark.xsl.sax

Class GenericDestination

Implemented Interfaces:
Destination
Known Direct 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

Method Summary

String
getEncoding()
returns the IANA character encoding name
Writer
getWriter(String contentType, 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(String uri)
By default return a FileDestination to the given (local) URI
protected void
setEncoding(String encoding)
sets the IANA character encoding name from a Java character encoding name.

Method Details

getEncoding

public String getEncoding()
returns the IANA character encoding name
Specified by:
getEncoding in interface Destination

getWriter

public Writer getWriter(String contentType,
                        String encoding)
            throws IOException,
                   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

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

resolve

public Destination resolve(String uri)
By default return a FileDestination to the given (local) URI
Specified by:
resolve in interface Destination

setEncoding

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