private void process(final Injector injector) {
        if (outputDir == null || outputDir.length() == 0) {
            throw new RuntimeException("Output directory must be specified");
        }

        final Path dir = Paths.get(outputDir);
        if (!Files.isDirectory(dir)) {
            System.out.println("Creating directory '" + outputDir + "'");
            try {
                Files.createDirectories(dir);
            } catch (final IOException e) {
                throw new RuntimeException("Unable to create output directory '" + outputDir + "'");
            }
        }

        try (final Stream<Path> stream = Files.list(dir)) {
            if (stream.count() > 0) {
                throw new RuntimeException("The output dir must be empty");
            }
        } catch (final IOException e) {
            throw new RuntimeException(e.getMessage(), e);
        }

        if (format == null || format.trim().length() == 0) {
            System.out.println("Using default output format: \"${feed}/${pathId}/${id}\"");
            format = "${feed}/${pathId}/${id}";
        }

        final Store streamStore = injector.getInstance(Store.class);
        final MetaService metaService = injector.getInstance(MetaService.class);
        final SecurityContext securityContext = injector.getInstance(SecurityContext.class);
        final DataDownloadTaskHandler streamDownloadTaskHandler = new DataDownloadTaskHandler(null,
                streamStore,
                metaService,
                securityContext);

        securityContext.asProcessingUser(() ->
                download(feed, streamType, createPeriodFrom, createPeriodTo, dir, format, streamDownloadTaskHandler));

        System.out.println("Finished dumping streams");
    }
Handy tool to dump out content.
stroom-data/stroom-data-store-util/src/main/java/stroom/data/store/util/StreamDumpTool.java