18 package org.turro.plugin;
20 import java.io.ByteArrayInputStream;
21 import java.io.ByteArrayOutputStream;
22 import java.io.IOException;
23 import java.io.ObjectInputStream;
24 import java.io.ObjectOutputStream;
25 import java.io.Serializable;
26 import java.util.logging.Level;
27 import java.util.logging.Logger;
28 import org.turro.elephant.context.ElephantContext;
36 private Serializable object;
48 object = (Serializable)
new ObjectInputStream(
new ByteArrayInputStream(buf)).readObject();
49 }
catch (IOException | ClassNotFoundException e) {
56 ByteArrayOutputStream baos =
new ByteArrayOutputStream();
57 ObjectOutputStream oos =
new ObjectOutputStream(baos);
58 oos.writeObject(
object);
60 return baos.toByteArray();
61 }
catch (IOException e) {
static String logMsg(String msg)
void setObject(Serializable object)
void bytesToObject(byte[] buf)