public interface LSOutput
这个接口允许应用程序封装在一个对象的输出目的地信息,其中可能包括一个URI,字节流(可能有一个指定的编码),基URI和/或字符流。
一个字节流和一个字符流的确切定义是绑定依赖的。
该应用程序预计将提供对象,实现这个接口时,这样的对象是必要的。应用程序可以提供它自己的对象实现这个接口,也可以使用通用的工厂方法DOMImplementationLS.createLSOutput()
创造实现此接口的对象。
的LSSerializer
将使用LSOutput
对象确定序列化输出。的LSSerializer
将看看以下才能知道哪一个输出在LSOutput
指定不同的输出,第一个是不空,不空字符串将被使用:
LSOutput.characterStream
LSOutput.byteStream
LSOutput.systemId
LSOutput
对象属于应用。DOM实现,不会修改(尽管它可以复制和修改的副本,如果必要的话)。
又见Document Object Model (DOM) Level 3 Load and Save Specification。
Modifier and Type | Method and Description |
---|---|
OutputStream |
getByteStream()
一种语言并结合依赖型代表一个可写入的字节流属性。
|
Writer |
getCharacterStream()
一个属性的一种语言,结合依赖型,代表一个可写流到这16位单元可以输出。
|
String |
getEncoding()
用于输出的字符编码。
|
String |
getSystemId()
系统标识符URI引用[
IETF RFC 2396 ],这个输出目的地。
|
void |
setByteStream(OutputStream byteStream)
一种语言并结合依赖型代表一个可写入的字节流属性。
|
void |
setCharacterStream(Writer characterStream)
一个属性的一种语言,结合依赖型,代表一个可写流到这16位单元可以输出。
|
void |
setEncoding(String encoding)
用于输出的字符编码。
|
void |
setSystemId(String systemId)
系统标识符URI引用[
IETF RFC 2396 ],这个输出目的地。
|
Writer getCharacterStream()
void setCharacterStream(Writer characterStream)
OutputStream getByteStream()
void setByteStream(OutputStream byteStream)
String getSystemId()
void setSystemId(String systemId)
String getEncoding()
void setEncoding(String encoding)
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.