public class StateMarshaller extends Object
| Constructor and Description |
|---|
StateMarshaller(StateType type)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] bytes)
Compresses the given data.
|
byte[] |
decompress(byte[] bytes)
Returns the state data, decompressed by the selected loader
(e.g.
|
static MarshallerConfig |
getConfig()
Returns marshaller configuration.
|
byte[] |
marshall(Object state,
boolean format,
MarshallerConfig config)
Saves a model instance state to a byte array.
|
byte[] |
marshall(Object state,
MarshallerConfig config)
Saves a model instance state to a byte array.
|
Object |
unmarshall(byte[] bytes)
Restores a model instance state from a byte array.
|
Object |
unmarshall(byte[] bytes,
ModelInstance modelInstance)
Restores a model instance state from a byte array.
|
public StateMarshaller(StateType type)
type - public byte[] marshall(Object state, boolean format, MarshallerConfig config) throws javax.xml.bind.JAXBException, IOException
state - format - config - javax.xml.bind.JAXBExceptionIOExceptionpublic byte[] marshall(Object state, MarshallerConfig config) throws javax.xml.bind.JAXBException, IOException
state - config - javax.xml.bind.JAXBExceptionIOExceptionpublic Object unmarshall(byte[] bytes) throws javax.xml.bind.JAXBException, IOException
bytes - javax.xml.bind.JAXBExceptionIOExceptionpublic Object unmarshall(byte[] bytes, ModelInstance modelInstance) throws javax.xml.bind.JAXBException, IOException
bytes - modelInstance - javax.xml.bind.JAXBExceptionIOExceptionpublic byte[] decompress(byte[] bytes)
throws IOException
bytes - IOExceptionpublic byte[] compress(byte[] bytes)
throws IOException
bytes - IOExceptionpublic static MarshallerConfig getConfig()
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.