org.dellroad.lzma.client
Class UTF8

java.lang.Object
  extended by 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
static String decode(byte[] utf)
          Decode the given UTF-8 data.
static byte[] encode(String s)
          Encode the given string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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