|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.CharacterRepresentation
org.restlet.representation.WriterRepresentation
org.restlet.ext.xml.XmlRepresentation
org.restlet.ext.xml.SaxRepresentation
public class SaxRepresentation
XML representation for SAX events processing. The purpose is to create a
streamable content based on a custom Java object model instead of a neutral
DOM tree. This domain object can then be directly modified and efficiently
serialized at a later time.
Subclasses only need to override the ContentHandler methods required for the
reading and also the write(XmlWriter writer) method when serialization is
requested.
Field Summary |
---|
Fields inherited from class org.restlet.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
SaxRepresentation(MediaType mediaType)
Constructor. |
|
SaxRepresentation(MediaType mediaType,
org.xml.sax.InputSource xmlSource)
Constructor. |
|
SaxRepresentation(Representation xmlRepresentation)
Constructor. |
Method Summary | |
---|---|
org.xml.sax.InputSource |
getInputSource()
Returns the XML representation as a SAX input source. |
void |
parse(org.xml.sax.ContentHandler contentHandler)
Parses the source and sends SAX events to a content handler. |
void |
release()
Releases the namespaces map. |
void |
write(java.io.OutputStream outputStream)
|
void |
write(java.io.Writer writer)
|
void |
write(XmlWriter writer)
Writes the representation to a XML writer. |
Methods inherited from class org.restlet.representation.WriterRepresentation |
---|
getReader |
Methods inherited from class org.restlet.representation.CharacterRepresentation |
---|
getChannel, getStream, write |
Methods inherited from class org.restlet.representation.Representation |
---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient |
Methods inherited from class org.restlet.representation.RepresentationInfo |
---|
getModificationDate, getTag, setModificationDate, setTag |
Methods inherited from class org.restlet.representation.Variant |
---|
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SaxRepresentation(MediaType mediaType)
mediaType
- The representation media type.public SaxRepresentation(MediaType mediaType, org.xml.sax.InputSource xmlSource)
mediaType
- The representation's media type.xmlSource
- A SAX input source to parse.public SaxRepresentation(Representation xmlRepresentation)
xmlRepresentation
- A source XML representation to parse.
java.io.IOException
Method Detail |
---|
public org.xml.sax.InputSource getInputSource() throws java.io.IOException
XmlRepresentation
getInputSource
in class XmlRepresentation
java.io.IOException
public void parse(org.xml.sax.ContentHandler contentHandler) throws java.io.IOException
contentHandler
- The SAX content handler to use for parsing.
java.io.IOException
public void release()
release
in class XmlRepresentation
public void write(java.io.OutputStream outputStream) throws java.io.IOException
write
in class CharacterRepresentation
java.io.IOException
public void write(XmlWriter writer) throws java.io.IOException
writer
- The XML writer to write to.
java.io.IOException
public void write(java.io.Writer writer) throws java.io.IOException
write
in class Representation
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |