+ public static ShardDataTreeSnapshot deserialize(final ObjectInput in) throws IOException {
+ final ShardDataTreeSnapshot ret = AbstractVersionedShardDataTreeSnapshot.versionedDeserialize(in);
+
+ // Make sure we consume all bytes, otherwise something went very wrong
+ final int bytesLeft = in.available();
+ if (bytesLeft != 0) {
+ throw new IOException("Deserialization left " + bytesLeft + " in the buffer");
+ }
+
+
+ return ret;
+ }
+