url.toURI() + ", timestamp is " + System.currentTimeMillis() + " ms");
int responseCode = connection.getResponseCode();
if (responseCode == 200) {
// Retrieve and deserialize the snapshot
InputStream input = connection.getInputStream();
TransactionSnapshot snapshot;
try {
snapshot = codecProvider.decode(input);
} finally {
input.close();
}
System.out.println("Snapshot taken and retrieved properly, snapshot timestamp is " +
snapshot.getTimestamp() + " ms");
if (persistingFilename != null) {
// Persist the snapshot on disk for future queries and debugging
File outputFile = new File(persistingFilename);
OutputStream out = new FileOutputStream(outputFile);