The ProcessSession class offers several API calls that make it possible to write to the contents of a FlowFile. One of those is:
When this is called, the session returns an OutputStream that the caller is responsible for closing. However, when the OutputStream is closed, the underlying stream to the content repository is neither closed nor made available for reuse. As a result, if this is used to write to many FlowFiles, those FlowFiles can each be written to a separate file on disk as well as be left open until the session is committed or rolled back.