T
- the model typepublic final class SerializableModelStorageHandler<T extends Serializable> extends Object implements ModelStorageHandler<T>
Constructor and Description |
---|
SerializableModelStorageHandler(Class<T> modelClass)
Creates a model storage handler that knows how to serialize the given class
|
Modifier and Type | Method and Description |
---|---|
Class<T> |
getModelClass()
Returns the model's java class
|
T |
read(DataInputStream in)
Deserialize a model from an input stream.
|
void |
write(T model,
DataOutputStream out)
Serialize a model to an output stream.
|
public final T read(DataInputStream in)
ModelStorageHandler
ModelStorageHandler.write(T, java.io.DataOutputStream)
.read
in interface ModelStorageHandler<T extends Serializable>
in
- the input stream.public final void write(T model, DataOutputStream out)
ModelStorageHandler
ModelStorageHandler.read(java.io.DataInputStream)
.write
in interface ModelStorageHandler<T extends Serializable>
model
- the model objectout
- the output streampublic Class<T> getModelClass()
ModelStorageHandler
getModelClass
in interface ModelStorageHandler<T extends Serializable>
Copyright © 2020 Actian Corporation. All rights reserved.