public void receiveRemotePart(final long createTime,
                                  final long metaId,
                                  final String fileHash,
                                  final String fileName,
                                  final boolean synchroniseMerge,
                                  final InputStream inputStream) throws IOException {
        if (!securityContext.isProcessingUser()) {
            throw new PermissionException(securityContext.getUserRef(), "Only processing users can use this resource");
        }

        final FileDescriptor fileDescriptor = new FileDescriptor(createTime, metaId, fileHash);
        final String receiveFileName = StringIdUtil.idToString(receiveId.incrementAndGet()) +
                                       SequentialFileStore.ZIP_EXTENSION;
        final Path receiveFile = receiveDir.resolve(receiveFileName);
        StreamUtil.streamToFile(inputStream, receiveFile);

        mergeProcessorProvider.get().add(fileDescriptor, receiveFile, synchroniseMerge);
    }
Receive a part file to add to an existing shard.

@param createTime
@param metaId
@param fileHash
@param fileName
@param inputStream
@param synchroniseMerge
@throws IOException
stroom-state/stroom-planb-impl/src/main/java/stroom/planb/impl/data/PartDestination.java