public Snapshot(File savedGame) throws IOException, SAXException { try { load(new GZIPInputStream(new FileInputStream(savedGame))); } catch (IOException e) { if ("Not in GZIP format".equals(e.getMessage())) { load(new FileInputStream(savedGame)); } else { throw e; } } }
private void readObject(java.io.ObjectInputStream stream) throws IOException, ClassNotFoundException { String xml = (String) stream.readObject(); InputStream is = new ByteArrayInputStream(xml.getBytes()); load(is); logger = LoggerFactory.getLogger(getClass()); }