UTF8String

object UTF8String
Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(bytes: Array[Byte]): UTF8String

Creates a UTF-8 string from a byte array.

Creates a UTF-8 string from a byte array.

The input byte array will be copied to ensure the immutability of UTF8String.

Throws
java.lang.IllegalArgumentException

if the input byte array is not a valid UTF-8 string

def apply(str: String): UTF8String

Creates a UTF-8 string from a string.

Creates a UTF-8 string from a string.

Throws
java.lang.IllegalArgumentException

if the input string is not a valid UTF-16 string, i.e., if it contains unpaired surrogates