Added Java serialization util functions back in network/common/util/JavaUtils

IllegalStateException doesn't seem to be an accurate description of this, does it? Of course, you can technically label everything as an illegal state ...