public class DomRepresentation extends Representation
UNKNOWN_SIZE
Constructor and Description |
---|
DomRepresentation(MediaType mediaType)
Constructor for an empty document.
|
DomRepresentation(MediaType mediaType,
com.google.gwt.xml.client.Document xmlDocument)
Constructor from an existing DOM document.
|
DomRepresentation(Representation xmlRepresentation)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
com.google.gwt.xml.client.Document |
getDocument()
Returns the wrapped DOM document.
|
java.io.Reader |
getReader() |
java.io.InputStream |
getStream() |
java.lang.String |
getText() |
void |
release()
Releases the wrapped DOM document and the source XML representation if
they have been defined.
|
void |
setDocument(com.google.gwt.xml.client.Document dom)
Sets the wrapped DOM document.
|
append, exhaust, getAvailableSize, getDisposition, getExpirationDate, getRange, getSize, hasKnownSize, isAvailable, isEmpty, isTransient, setAvailable, setDisposition, setExpirationDate, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public DomRepresentation(MediaType mediaType)
mediaType
- The representation's media type.public DomRepresentation(MediaType mediaType, com.google.gwt.xml.client.Document xmlDocument)
mediaType
- The representation's media type.xmlDocument
- The source DOM document.public DomRepresentation(Representation xmlRepresentation)
xmlRepresentation
- A source XML representation to parse.public com.google.gwt.xml.client.Document getDocument() throws java.io.IOException
java.io.IOException
public java.io.Reader getReader() throws java.io.IOException
getReader
in class Representation
java.io.IOException
public java.io.InputStream getStream() throws java.io.IOException
getStream
in class Representation
java.io.IOException
public java.lang.String getText() throws java.io.IOException
getText
in class Representation
java.io.IOException
public void release()
release
in class Representation
public void setDocument(com.google.gwt.xml.client.Document dom)
dom
- The wrapped DOM document.Copyright © 2005-2024 Restlet.