| 类 | 描述 |
|---|---|
| StreamResult |
作为一个转型的结果的一个烛台,可能是XML,纯文本,HTML标记,或其他形式。
|
| StreamSource |
作为XML标记的流的形式的转换源的灯座。
|
这个包实现流和URI的具体转换的API。
的StreamSource类提供用于指定InputStream输入,Reader输入方法,并以字符串的形式输入URL。即使一个输入流或读者被指定为源,StreamSource.setSystemId(java.lang.String)仍然应该被称为,使变压器能知道它应该解决相对URI。公共标识始终是可选的:如果应用作家包括,它将提供的SourceLocator信息部分。
的StreamResult类提供用于指定OutputStream,Writer方法,或输出系统ID,作为转换结果输出。
常流应使用而不是读者或作家,为来源和结果,因为读者和作者已经建立了内部编码和Unicode格式。然而,有些时候是写入字符流有用,例如当使用stringwriter为了写一个字符串,或者在阅读源XML的情况下从一个StringReader。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.