oos.writeObject(object);
oos.flush();
oos.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
ObjectInputStreamExt ois = new ObjectInputStreamExt(bais, classLoader);
return ois.readObject();
}
public static Object readObject(Class type, InputStream in) {
if (type == Void.TYPE) {
return null;