@UESComponent public interface Marshaller
Modifier and Type | Method and Description |
---|---|
MarshallingContext |
createContext(MediaType aMediaType)
Creates context for specified media type.
|
boolean |
isSupported(java.lang.Class<?> aClass,
Returns whether it's possible to (un)marshal value of class aClass to/from
media type aMediaType.
|
void |
marshal(java.lang.Object aObject,
Performs marshalling of aObject into aOutput stream using specified
context.
|
void |
marshal(java.lang.Object aObject,
Performs marshalling of aObject into aOutput stream in specified media
type.
|
<T> T |
unmarshal(java.lang.Class<T> aClass,
Performs unmarshalling of an object of class aClass from aInput stream
using specified context.
|
<T> T |
unmarshal(java.lang.Class<T> aClass,
Performs unmarshalling of an object of class aClass from aInput stream
which contains data in specified media type format.
|
aMediaType
- The media type.aClass
- The class.aMediaType
- The media type.Note that using this method is effectively the same as calling:
marshaller.marshal(aObject, aOutput, marshaller.createContext(aMediaType));
aObject
- The object to marshal.aOutput
- The output stream.aMediaType
- The media type.aObject
- The object to marshal.aOutput
- The output stream.aContext
- The context.Note that using this method is effectively the same as calling:
marshaller.unmarshal(aClass, aInput, marshaller.createContext(aMediaType));
T
- The type of the unmarshalled object.aClass
- The class of the unmarshalled object.aInput
- The input stream to unmarshal from.aMediaType
- The media type.T
- The type of the unmarshalled object.aClass
- The class of the unmarshalled object.aInput
- The input stream to unmarshal from.aContext
- The context.