The
Action Invoker does not directly allow binary data as an input or return it as an output, so it uses routines to convert binary data to and from string representations.
When specifying a format to describe binary data passed to the Action Invoker as an input, typically using the argument bytesFormat, there are five options, with the default option, if none is specified, as "autodetect":
- "autodetect": When autodetecting the format, the binary data string is examined as if it were a data URL, and if not a data URL, is assumed to be encoded as Base64.
- "Base64": The binary data string represents bytes in Base64 format.
- "dataUrl": The binary data string contains a data URL.
- "hex": The binary data string represents bytes in hexadecimal format.
- "text": The binary data string contains text that is converted to bytes in its UTF-8 representation.
An exception is thrown if the input binary data string is not valid when using a data URL or hexadecimal characters.
When specifying a format for the binary data that Action Invoker returns, there are four options, with the default option, if none is specified, as "dataUrl":
- "Base64": The string returned represents bytes in Base64 format.
- "dataUrl": The string returned contains a data URL.
- "hex": The string returned represents bytes in hexadecimal format. The hexadecimal characters are returned in lowercase.
- "localhostUrl": The string returned contains a localhost URL that can be used to access the binary data, served using a local web server. This URL is only valid as long as the application is running.
No exceptions are thrown while returning binary data.
Here is the presentation of the text "Hello, World!" in the four direct input formats:
- Base64: "SGVsbG8sIFdvcmxkIQ=="
- Data URL: "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="
- Hex: "48656c6c6f2c20576f726c6421"
- Text: "Hello, World!"
The localhost URL output format may look something like: "http://localhost:50505/vf/1".