blob: dc500655786288a91e83c8e7740c0ce3cc8d70df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.slime;
import com.yahoo.text.Utf8;
/**
* Helper class for conversion between String and UTF-8 representations.
*/
class Utf8Codec {
public static String decode(byte[] data, int pos, int len) {
return Utf8.toString(data, pos, len);
}
public static byte[] encode(String str) {
return Utf8.toBytes(str);
}
}
|