T
- The type to wrap.@Deprecated public class XstreamRepresentation<T> extends WriterRepresentation
createXstream(MediaType)
or getXstream()
) and apply security
permissions. You can find more documentation about the security fix and how
to configure the XStream object from here: XStream security enhancements.UNKNOWN_SIZE
Constructor and Description |
---|
XstreamRepresentation(MediaType mediaType,
T object)
Deprecated.
Constructor.
|
XstreamRepresentation(Representation representation,
Class<T> targetClass)
Deprecated.
Constructor.
|
XstreamRepresentation(T object)
Deprecated.
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected com.thoughtworks.xstream.XStream |
createXstream(MediaType mediaType)
Deprecated.
Creates an XStream object based on a media type.
|
Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> |
getJsonDriverClass()
Deprecated.
Returns the XStream JSON driver class.
|
T |
getObject()
Deprecated.
Returns the wrapped object, deserializing the representation with XStream
if necessary.
|
Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> |
getXmlDriverClass()
Deprecated.
Returns the XStream XML driver class.
|
com.thoughtworks.xstream.XStream |
getXstream()
Deprecated.
Returns the modifiable XStream object.
|
void |
setJsonDriverClass(Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> jsonDriverClass)
Deprecated.
Sets the XStream JSON driver class.
|
void |
setXmlDriverClass(Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> xmlDriverClass)
Deprecated.
Sets the XStream XML driver class.
|
void |
setXstream(com.thoughtworks.xstream.XStream xstream)
Deprecated.
Sets the XStream object.
|
void |
write(Writer writer)
Deprecated.
Writes the representation to a characters writer.
|
getReader
getChannel, getStream, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public XstreamRepresentation(MediaType mediaType, T object)
mediaType
- The target media type.object
- The object to format.public XstreamRepresentation(Representation representation, Class<T> targetClass)
representation
- The representation to parse.targetClass
- The target class of the object to serialize.public XstreamRepresentation(T object)
MediaType.APPLICATION_XML
media type by
default.object
- The object to format.protected com.thoughtworks.xstream.XStream createXstream(MediaType mediaType) throws IOException
HierarchicalStreamDriver
or a DomDriver
.mediaType
- The serialization media type.IOException
public Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> getJsonDriverClass()
public T getObject() throws IOException
IOException
public Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> getXmlDriverClass()
public com.thoughtworks.xstream.XStream getXstream() throws IOException
IOException
public void setJsonDriverClass(Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> jsonDriverClass)
jsonDriverClass
- The XStream JSON driver class.public void setXmlDriverClass(Class<? extends com.thoughtworks.xstream.io.HierarchicalStreamDriver> xmlDriverClass)
xmlDriverClass
- The XStream XML driver class.public void setXstream(com.thoughtworks.xstream.XStream xstream)
xstream
- The XStream object.public void write(Writer writer) throws IOException
Representation
Writer
after writing to it as this will be handled
by the Restlet connectors automatically.write
in class Representation
writer
- The characters writer.IOException
Copyright © 2005–2018. All rights reserved.