public void load(InputStream is) throws SnapshotCorruptedException {
doc = XmlUtils.parseDocument(is);
root = doc.getDocumentElement();
String snapshotVersion = root.getAttribute("app-version");
if (!snapshotVersion.equals(Application.VERSION) && !snapshotVersion.equals(Application.DEV_VERSION)) {
if ((new VersionComparator()).compare(snapshotVersion, Snapshot.COMPATIBLE_FROM) < 0) {
throw new SnapshotVersionException("Saved game is not compatible with current JCloisterZone application. (saved in "+snapshotVersion+")");
}
}
}