BytesHexFormat
Represents hexadecimal format options for formatting and parsing ByteArray
.
When formatting one can assume that bytes are firstly separated using LF character ('\n'
) into lines with bytesPerLine bytes in each line. The last line may have fewer bytes. Then each line is separated into groups using groupSeparator with bytesPerGroup bytes in each group, except the last group in the line, which may have fewer bytes. All bytes in a group are separated using byteSeparator. Each byte is converted to its two-digit hexadecimal representation, immediately preceded by bytePrefix and immediately succeeded by byteSuffix.
When parsing the input string is required to be in the format described above. However, any of the char sequences CRLF, LF and CR is considered a valid line separator, and parsing is performed in case-insensitive manner.
See BytesHexFormat.Builder to find out how the options are configured, and what is the default value of each option.
Since Kotlin
1.9Types
A context for building a BytesHexFormat. Provides API for configuring format options.
Properties
The string that immediately precedes two-digit hexadecimal representation of each byte.
The string that immediately succeeds two-digit hexadecimal representation of each byte.