org.apache.batik.transcoder

Class TranscoderOutput

public class TranscoderOutput extends Object

This class represents a single output for a Transcoder.
Field Summary
protected Documentdocument
The optional output as XML Document.
protected OutputStreamostream
The optional output has a byte stream.
protected Stringuri
The optional output as a URI.
protected Writerwriter
The optional output as a character stream.
protected XMLFilterxmlFilter
The optional XML filter where to send SAX events.
Constructor Summary
TranscoderOutput()
Constructs a new empty TranscoderOutput.
TranscoderOutput(XMLFilter xmlFilter)
Constructs a new TranscoderOutput with the specified XML filter.
TranscoderOutput(OutputStream ostream)
Constructs a new TranscoderOutput with the specified byte stream output.
TranscoderOutput(Writer writer)
Constructs a new TranscoderOutput with the specified character stream.
TranscoderOutput(Document document)
Constructs a new TranscoderOutput with the specified Document.
TranscoderOutput(String uri)
Constructs a new TranscoderOutput with the specified uri.
Method Summary
DocumentgetDocument()
Returns the output of this transcoder as a document or null if none was supplied.
OutputStreamgetOutputStream()
Returns the output of this transcoder as a byte stream or null if none was supplied.
StringgetURI()
Returns the output of this transcoder as a URI or null if none was supplied.
WritergetWriter()
Returns the output of this transcoder as a character stream or null if none was supplied.
XMLFiltergetXMLFilter()
Returns the output of this transcoder as a XML filter or null if none was supplied.
voidsetDocument(Document document)
Sets the output of this transcoder output with the specified document.
voidsetOutputStream(OutputStream ostream)
Sets the output of this transcoder output with the specified byte stream.
voidsetURI(String uri)
Sets the output of this transcoder output with the specified URI.
voidsetWriter(Writer writer)
Sets the output of this transcoder output with the specified character stream.
voidsetXMLFilter(XMLFilter xmlFilter)
Sets the output of this transcoder output with the specified XML filter.

Field Detail

document

protected Document document
The optional output as XML Document.

ostream

protected OutputStream ostream
The optional output has a byte stream.

uri

protected String uri
The optional output as a URI.

writer

protected Writer writer
The optional output as a character stream.

xmlFilter

protected XMLFilter xmlFilter
The optional XML filter where to send SAX events.

Constructor Detail

TranscoderOutput

public TranscoderOutput()
Constructs a new empty TranscoderOutput.

TranscoderOutput

public TranscoderOutput(XMLFilter xmlFilter)
Constructs a new TranscoderOutput with the specified XML filter.

Parameters: xmlFilter the XML filter of this transcoder output

TranscoderOutput

public TranscoderOutput(OutputStream ostream)
Constructs a new TranscoderOutput with the specified byte stream output.

Parameters: ostream the byte stream of this transcoder output

TranscoderOutput

public TranscoderOutput(Writer writer)
Constructs a new TranscoderOutput with the specified character stream.

Parameters: writer the character stream of this transcoder output

TranscoderOutput

public TranscoderOutput(Document document)
Constructs a new TranscoderOutput with the specified Document.

Parameters: document the Document of this transcoder output

TranscoderOutput

public TranscoderOutput(String uri)
Constructs a new TranscoderOutput with the specified uri.

Parameters: uri the URI of this transcoder output

Method Detail

getDocument

public Document getDocument()
Returns the output of this transcoder as a document or null if none was supplied.

getOutputStream

public OutputStream getOutputStream()
Returns the output of this transcoder as a byte stream or null if none was supplied.

getURI

public String getURI()
Returns the output of this transcoder as a URI or null if none was supplied.

getWriter

public Writer getWriter()
Returns the output of this transcoder as a character stream or null if none was supplied.

getXMLFilter

public XMLFilter getXMLFilter()
Returns the output of this transcoder as a XML filter or null if none was supplied.

setDocument

public void setDocument(Document document)
Sets the output of this transcoder output with the specified document.

Parameters: document the document of this transcoder output

setOutputStream

public void setOutputStream(OutputStream ostream)
Sets the output of this transcoder output with the specified byte stream.

Parameters: ostream the byte stream of this transcoder output

setURI

public void setURI(String uri)
Sets the output of this transcoder output with the specified URI.

Parameters: uri the URI of this transcoder output

setWriter

public void setWriter(Writer writer)
Sets the output of this transcoder output with the specified character stream.

Parameters: writer the character stream of this transcoder output

setXMLFilter

public void setXMLFilter(XMLFilter xmlFilter)
Sets the output of this transcoder output with the specified XML filter.

Parameters: xmlFilter the XML filter of this transcoder output

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.