public class StandardSerialization extends java.lang.Object implements Serialization
Constructor and Description |
---|
StandardSerialization() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
deserialize(byte[] bytes)
Deserialize object from byte array
|
java.lang.Object |
deserialize(java.io.InputStream is)
Deserialize object from stream
|
byte[] |
serialize(java.lang.Object object)
Serialize object to byte array
|
void |
serialize(java.lang.Object object,
java.io.OutputStream os)
Serialize object
object to stream os . |
public void serialize(java.lang.Object object, java.io.OutputStream os)
Serialization
object
to stream os
.
Stream isn't closed automatically after serialization.
User code should be close stream correctlyserialize
in interface Serialization
object
- objectos
- output streampublic java.lang.Object deserialize(java.io.InputStream is)
Serialization
deserialize
in interface Serialization
public byte[] serialize(java.lang.Object object)
Serialization
serialize
in interface Serialization
public java.lang.Object deserialize(byte[] bytes)
Serialization
deserialize
in interface Serialization