1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>javax.xml.transform.stream</title>
8 <p>This package implements stream- and URI- specific transformation APIs.
10 <p>The {@link javax.xml.transform.stream.StreamSource} class
11 provides methods for specifying {@link java.io.InputStream} input,
12 {@link java.io.Reader} input, and URL input in the form of strings. Even
13 if an input stream or reader is specified as the source,
14 {@link javax.xml.transform.stream.StreamSource#setSystemId} should still
15 be called, so that the transformer can know from where it should resolve
16 relative URIs. The public identifier is always optional: if the application
17 writer includes one, it will be provided as part of the
18 {@link javax.xml.transform.SourceLocator} information.</p>
19 <p>The {@link javax.xml.transform.stream.StreamResult} class
20 provides methods for specifying {@link java.io.OutputStream},
21 {@link java.io.Writer}, or an output system ID, as the output of the
22 transformation result.</p>
23 <p>Normally streams should be used rather than readers or writers, for
24 both the Source and Result, since readers and writers already have the encoding
25 established to and from the internal Unicode format. However, there are times
26 when it is useful to write to a character stream, such as when using a
27 StringWriter in order to write to a String, or in the case of reading source
28 XML from a StringReader.</p>