Skip to content

Buffer Reverse#

This converter reverses the content of a buffer (Used to change between little/big endian).

Settings#

This converter has no settings.

converter_buffer_reverse

Examples#

Input Buffer Output Buffer
Buffer.from("1234") → 31 32 33 34 Buffer.from("4321") → 34 33 32 31

Table 1: Examples

Invalid Input#

This converter fails when the input is not a Buffer. For what happens to the rest of the chain when a converter fails (the error is logged, reported for monitoring, and the next task does not run), see Converters.

Input Result
"Not a buffer" (String) Fails with Given input value is not an instance of a Buffer.

Table 2: Invalid Input

Remarks#

The converter reverses the received buffer in place, so another link from the same output that has no converter also receives the reversed bytes.