Package org.dellroad.lzma.client
Class UTF8
- java.lang.Object
-
- org.dellroad.lzma.client.UTF8
-
public final class UTF8 extends Object
Encodes and decodes strings to/from binary using "modified UTF-8 encoding". This is the same encoding as is used by Java class files.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringdecode(byte[] utf)Decode the given UTF-8 data.static byte[]encode(String s)Encode the given string.static voidmain(String[] args)
-
-
-
Method Detail
-
encode
public static byte[] encode(String s)
Encode the given string.
-
decode
public static String decode(byte[] utf)
Decode the given UTF-8 data.- Throws:
IllegalArgumentException- if the UTF-8 input is invalid
-
-