50 lines
3.3 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<h1 class="title" title="Package">Package javax.xml.transform.stream</h1>
<div class="docSummary">
<div class="block">
该包实现流和URI特定的转换API。
</div>
</div>
<p>See: <a href="#package.description">描述</a></p>
</div><div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Class Summary table, listing classes, and an explanation">
<caption>
<span>类摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col"></th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../javax/xml/transform/stream/StreamResult.html" title="class in javax.xml.transform.stream">StreamResult</a></td>
<td class="colLast">
<div class="block">
作为转换结果的持有人可以是XML纯文本HTML或其他形式的标记。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../javax/xml/transform/stream/StreamSource.html" title="class in javax.xml.transform.stream">StreamSource</a></td>
<td class="colLast">
<div class="block">
作为转换的持有人以XML标记流的形式来源。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<a name="package.description">
<!-- --> </a>
<h2 title="Package javax.xml.transform.stream Description">Package javax.xml.transform.stream Description</h2>
<div class="block">
<p> <span>该包实现流和URI特定的转换API。</span> </p>
<p> <span><a href="../../../../javax/xml/transform/stream/StreamSource.html" title="javax.xml.transform.stream中的类"><code>StreamSource</code></a>类提供了以字符串形式指定<a href="../../../../java/io/InputStream.html" title="java.io中的类"><code>InputStream</code></a>输入, <a href="../../../../java/io/Reader.html" title="java.io中的类"><code>Reader</code></a>输入和URL输入的方法。</span> <span>即使输入流或读取器被指定为源, <a href="../../../../javax/xml/transform/stream/StreamSource.html#setSystemId-java.lang.String-"><code>StreamSource.setSystemId(java.lang.String)</code></a>仍然应该叫使变压器可以从那里应该可以解决相对URI知道。</span> <span>公共标识符始终是可选的:如果应用程序作者包括一个,那么它将作为<a href="../../../../javax/xml/transform/SourceLocator.html" title="javax.xml.transform中的接口"><code>SourceLocator</code></a>信息的一部分提供。</span> </p>
<p> <span>所述<a href="../../../../javax/xml/transform/stream/StreamResult.html" title="javax.xml.transform.stream中的类"><code>StreamResult</code></a>类提供了用于指定方法<a href="../../../../java/io/OutputStream.html" title="java.io中的类"><code>OutputStream</code></a> <a href="../../../../java/io/Writer.html" title="java.io中的类"><code>Writer</code></a> 或输出系统ID作为变换结果的输出。</span> </p>
<p> <span>对于Source和Result来说通常应该使用流而不是读者或作者因为读者和作者已经拥有和从内部Unicode格式建立的编码。</span> <span>然而有时写入字符流是有用的例如当使用StringWriter来写入String时或者从StringReader读取源XML的情况。</span> </p>
</div>
</div>