|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.document.DOMXMLElement
net.jxta.impl.document.DOMXMLDocument
public class DOMXMLDocument
This class is an implementation of the StructuredDocument interface using DOM
org.w3c.dom
Field Summary | |
---|---|
static StructuredDocumentFactory.TextInstantiator |
INSTANTIATOR
|
Fields inherited from class net.jxta.impl.document.DOMXMLElement |
---|
domNode, root |
Method Summary | |
---|---|
DOMXMLElement |
createElement(Object key)
Create a new element without value. |
DOMXMLElement |
createElement(Object key,
Object val)
Create a new element with value. |
DOMXMLElement |
createElement(String name)
Create a new element without value. |
DOMXMLElement |
createElement(String name,
String value)
Create a new element with value. |
protected Node |
getAssocNode()
Returns the DOM Node associated with this StructuredDocument element. |
String |
getFileExtension()
Returns the file extension type used by this Document . |
MimeMediaType |
getMimeType()
Returns the MIME Media type of this Document per
IETF RFC 2046 MIME : Media Types. |
Reader |
getReader()
Returns the sequence of characters which represents the content of the TextDocument . |
InputStream |
getStream()
Returns the stream of bytes which represents the content of this Document . |
void |
sendToStream(OutputStream stream)
Send the contents of this Document to the specified stream. |
void |
sendToWriter(Writer writer)
Send the contents of this TextDocument to the specified
Writer. |
String |
toString()
|
Methods inherited from class net.jxta.impl.document.DOMXMLElement |
---|
addAttribute, addAttribute, appendChild, equals, getAttribute, getAttributes, getChildren, getChildren, getChildren, getKey, getName, getParent, getRoot, getTextValue, getValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.jxta.document.XMLElement |
---|
getRoot |
Methods inherited from interface net.jxta.document.Attributable |
---|
addAttribute, addAttribute, getAttribute, getAttributes |
Methods inherited from interface net.jxta.document.TextElement |
---|
getChildren, getKey, getName, getTextValue, getValue |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getParent |
Field Detail |
---|
public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR
Method Detail |
---|
public String toString()
toString
in class Object
public MimeMediaType getMimeType()
Document
per
IETF RFC 2046 MIME : Media Types.
JXTA does not currently support the 'Multipart
' or
'Message
' media types.
getMimeType
in interface Document
Document
.public String getFileExtension()
Document
. This
value is usually chosen based upon the MIME Media Type.
getFileExtension
in interface Document
Document
.public InputStream getStream() throws IOException
Document
.
getStream
in interface DocumentStreamIO
InputStream
containing the bytes
of this Document
.
IOException
- For errors while writing the Document
.public void sendToStream(OutputStream stream) throws IOException
Document
to the specified stream.
sendToStream
in interface DocumentStreamIO
stream
- The OutputStream to which the Document
will
be written.
IOException
- For errors while writing the Document
.public Reader getReader()
TextDocument
.
getReader
in interface TextDocumentReaderIO
Reader
containing the characters of the
TextDocument
.public void sendToWriter(Writer writer) throws IOException
TextDocument
to the specified
Writer.
sendToWriter
in interface TextDocumentReaderIO
writer
- The Writer
to which the characters of the
TextDocument
will be written.
IOException
- If an I/O error occurs.public DOMXMLElement createElement(Object key)
createElement
in interface StructuredDocument<DOMXMLElement>
key
- The key of the element to be created.
public DOMXMLElement createElement(Object key, Object val)
createElement
in interface StructuredDocument<DOMXMLElement>
key
- The name of the element to be created.val
- The value of the element to be created or
null
if no value is desired.
public DOMXMLElement createElement(String name)
createElement
in interface StructuredTextDocument<DOMXMLElement>
createElement
in interface XMLDocument<DOMXMLElement>
name
- The name of the element to be created.
public DOMXMLElement createElement(String name, String value)
createElement
in interface StructuredTextDocument<DOMXMLElement>
createElement
in interface XMLDocument<DOMXMLElement>
name
- The name of the element to be created.value
- The value of the element to be created.
protected Node getAssocNode()
DOMXMLElement
getAssocNode
in class DOMXMLElement
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |