16 package org.openkilda.messaging;
18 import java.io.ByteArrayInputStream;
19 import java.io.ByteArrayOutputStream;
20 import java.io.IOException;
21 import java.io.ObjectInputStream;
22 import java.io.ObjectOutputStream;
23 import java.nio.ByteBuffer;
29 default Object
deserialize() throws IOException, ClassNotFoundException {
30 ByteArrayInputStream bais =
new ByteArrayInputStream(
byteBuffer.array());
31 ObjectInputStream ois =
new ObjectInputStream(bais);
32 Object obj = ois.readObject();
40 default void serialize(Object obj)
throws IOException {
41 ByteArrayOutputStream baos =
new ByteArrayOutputStream();
42 ObjectOutputStream oos =
new ObjectOutputStream(baos);
default Object deserialize()
default void serialize(Object obj)