StringEncodingSettings
data class StringEncodingSettings(val endMarking: StringEncodingSettings.EndMarking = LengthPrefix.ByteLength, val encoding: Encoding = Encoding.UTF_8)
Settings to determine how a String should be encoded into a ByteArray.
Constructors
Link copied to clipboard
constructor(endMarking: StringEncodingSettings.EndMarking = LengthPrefix.ByteLength, encoding: Encoding = Encoding.UTF_8)
Types
Link copied to clipboard
Method used for marking the end of a String when encoding it to a ByteArray
Link copied to clipboard
An EndMarking where the String is always encoded as a fixed length length. If the string is longer, its final characters will be dropped. If it is smaller, it will be padded with null characters.
Link copied to clipboard
An EndMarking where the length of the String is encoded as a prefix.
Link copied to clipboard
No EndMarking will be used, the entire array should be decoded
Link copied to clipboard
An EndMarking where the end is marked by a final empty character \u0000. If the string contains this character encoding will fail.