Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Latest commit

 

History

History
55 lines (37 loc) · 1.67 KB

File metadata and controls

55 lines (37 loc) · 1.67 KB

File Sink

This module writes each message it receives to a file.

Input

Headers

N/A

Payload

  • java.io.File

  • java.io.InputStream

  • byte[]

  • String

Output

N/A (writes to the file system).

Options

The file sink has the following options:

file.binary

A flag to indicate whether adding a newline after the write should be suppressed. (Boolean, default: false)

file.charset

The charset to use when writing text content. (String, default: UTF-8)

file.directory

The parent directory of the target file. (String, default: <none>)

file.directory-expression

The expression to evaluate for the parent directory of the target file. (Expression, default: <none>)

file.mode

The FileExistsMode to use if the target file already exists. (FileExistsMode, default: <none>, possible values: APPEND,APPEND_NO_FLUSH,FAIL,IGNORE,REPLACE,REPLACE_IF_MODIFIED)

file.name

The name of the target file. (String, default: file-sink)

file.name-expression

The expression to evaluate for the name of the target file. (String, default: <none>)

file.suffix

The suffix to append to file name. (String, default: <empty string>)

Build

$ ./mvnw clean install -PgenerateApps
$ cd apps

You can find the corresponding binder based projects here. You can then cd into one of the folders and build it:

$ ./mvnw clean package

Examples

java -jar file_sink.jar --file.directory=/tmp/bar