return baos.toByteArray();
}
public Serializable deserialize(byte[] source, @SuppressWarnings("rawtypes") Class clazz) throws IOException, ClassNotFoundException {
Stopwatch stopWatch = SimonManager.getStopwatch("serializer.javaDeserialize");
Split split = stopWatch.start();
ByteArrayInputStream bis = new ByteArrayInputStream(source);
ObjectInputStream ois = new ObjectInputStream(bis);
Serializable obj = (Serializable) ois.readObject();
ois.close();
split.stop();
return obj;
}