com.caucho.transform
Interface StreamTransformer
- All Superinterfaces:
- Transformer
- All Known Implementing Classes:
- StreamTransformerImpl
- public interface StreamTransformer
- extends Transformer
Transforms the input to an output stream.
Stylesheet style;
StreamTransformer transformer = style.newStreamTransformer();
WriteStream os = Vfs.openWrite("test.html");
transformer.transform("test.xml", os);
os.close();
- Since:
- Resin 1.2
Method Summary |
void |
transform(java.io.InputStream source,
java.io.OutputStream os)
Transforms an input stream to the output stream. |
void |
transform(Node node,
java.io.OutputStream os)
Transforms a DOM node to the output stream. |
void |
transform(java.lang.String systemId,
java.io.OutputStream os)
Transforms a file to the output stream. |
void |
transformString(java.lang.String source,
java.io.OutputStream os)
Transforms a string to the output stream. |
transform
public void transform(java.io.InputStream source,
java.io.OutputStream os)
throws SAXException,
java.io.IOException
- Transforms an input stream to the output stream.
- Parameters:
source
- an input stream for an XML document.os
- the destination output stream.
transform
public void transform(java.lang.String systemId,
java.io.OutputStream os)
throws SAXException,
java.io.IOException
- Transforms a file to the output stream.
- Parameters:
systemId
- name of a file to parse as an XML document.os
- the destination output stream.
transform
public void transform(Node node,
java.io.OutputStream os)
throws SAXException,
java.io.IOException
- Transforms a DOM node to the output stream.
- Parameters:
node
- A DOM node to be transformed.os
- the destination output stream.
transformString
public void transformString(java.lang.String source,
java.io.OutputStream os)
throws SAXException,
java.io.IOException
- Transforms a string to the output stream.
- Parameters:
source
- A string to be parsed as XML as the source.os
- the destination output stream.