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.JAXBException
IOException
public byte[] marshall(Object state, MarshallerConfig config) throws javax.xml.bind.JAXBException, IOException
state
- config
- javax.xml.bind.JAXBException
IOException
public Object unmarshall(byte[] bytes) throws javax.xml.bind.JAXBException, IOException
bytes
- javax.xml.bind.JAXBException
IOException
public Object unmarshall(byte[] bytes, ModelInstance modelInstance) throws javax.xml.bind.JAXBException, IOException
bytes
- modelInstance
- javax.xml.bind.JAXBException
IOException
public byte[] decompress(byte[] bytes) throws IOException
bytes
- IOException
public byte[] compress(byte[] bytes) throws IOException
bytes
- IOException
public static MarshallerConfig getConfig()
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.