IoBuffer buf = IoBuffer.allocate(objectSize + 4, false);
buf.putInt(objectSize);
in.readFully(buf.array(), 4, objectSize);
buf.position(0);
buf.limit(objectSize + 4);
return buf.getObject(classLoader);
}
public boolean readBoolean() throws IOException {