OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / libcore / luni / src / main / java / javax / xml / transform / stream / package.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3 <head>
4 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>javax.xml.transform.stream</title>
6 </head>
7 <body>
8 <p>This package implements stream- and URI- specific transformation APIs.
9          </p>
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>
29 </body>
30 </html>