public OutputStream getOutputStream(final String streamTypeName, final Path file)
            throws IOException {
        if (streamTypeName == null) {
            throw new IllegalArgumentException("Must Have a non-null stream type");
        }
        IOException ioEx = null;
        OutputStream outputStream = null;
        if (FileStoreType.bgz.equals(getFileStoreType(streamTypeName))) {
            try {
                outputStream = new BlockGZIPOutputFile(file);
            } catch (IOException e) {
                ioEx = e;
            }
        } else {
            try {
                outputStream = new LockingFileOutputStream(file, isStreamTypeLazy(streamTypeName));
            } catch (IOException e) {
                ioEx = e;
            }
        }
        if (ioEx != null) {
            throw ioEx;
        }
        return outputStream;
    }
Return back a output stream for a given stream type and file.
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/FsPathHelper.java