s_context = getToolContext();
SnapshotUtils snapshotUtils = SnapshotUtils.of(s_context.getMarketDataSnapshotMaster());
if (!MarketDataSnapshotToolUtils.handleQueryOptions(snapshotUtils, getCommandLine())) {
SnapshotReader snapshotReader = constructSnapshotReader(UniqueId.parse(getCommandLine().getOptionValue(
SNAPSHOT_UID_OPTION)));
SnapshotWriter snapshotWriter = constructSnapshotWriter(getCommandLine().getOptionValue(FILE_NAME_OPTION));
SnapshotCopier snapshotCopier = new SimpleSnapshotCopier();
snapshotCopier.copy(snapshotReader, snapshotWriter);
// close the reader and writer
snapshotReader.close();
snapshotWriter.close();
}
System.exit(0);
}