public void loadEventData(final String feedName,
                              final Path dataLocation,
                              final Path contextLocation) throws IOException {

        // Add the associated data to the stream store.
        final MetaProperties metaProperties = MetaProperties.builder()
                .feedName(feedName)
                .typeName(StreamTypeNames.RAW_EVENTS)
                .build();

        Meta meta;
        try (final Target target = store.openTarget(metaProperties)) {
            meta = target.getMeta();

            try (final OutputStreamProvider outputStreamProvider = target.next()) {
                try (final InputStream inputStream = Files.newInputStream(dataLocation);
                        final SegmentOutputStream outputStream = outputStreamProvider.get()) {
                    StreamUtil.streamToStream(inputStream, outputStream);
                }

                if (contextLocation != null) {
                    try (final InputStream inputStream = Files.newInputStream(contextLocation);
                            final SegmentOutputStream outputStream = outputStreamProvider.get(
                                    StreamTypeNames.CONTEXT)) {

                        StreamUtil.streamToStream(inputStream, outputStream);
                    }
                }
            }
        }

        // Check that the data was written ok.
        final String data = StreamUtil.fileToString(dataLocation);
        try (final Source checkSource = store.openSource(meta.getId())) {
            assertThat(SourceUtil.readString(checkSource)).isEqualTo(data);
        }
    }
Adds event data to a stream store.

@param feedName                         The feed name to use.
@param translationTextConverterType     Type of text converter
@param translationTextConverterLocation The Text Converter location
@param translationXsltLocation          The XSLT location
@param dataLocation                     The event data location.
@param referenceFeeds                   The reference feeds used.
@return An event feed definition.
@throws IOException Thrown if files not found.
stroom-app/src/test/java/stroom/test/StoreCreationTool.java