FileDocCategorySizeDatePackage
UTF8CharsetTest.javaAPI DocAndroid 1.5 API2484Wed May 06 22:41:04 BST 2009tests.api.java.nio.charset

UTF8CharsetTest

public class UTF8CharsetTest extends AbstractCharsetTestCase
Test UTF-8 charset.

Fields Summary
Constructors Summary
public UTF8CharsetTest()
Constructor for UTF8CharsetTest.

        super("UTF-8", new String[] { "UTF8" }, true, true);
    
Methods Summary
public voidtestDecode_Normal()

        byte[] input = new byte[] { 97, 98, -27, -76, -108, -26, -107, -113 };
        char[] output = "ab\u5D14\u654F".toCharArray();
        internalTestDecode(input, output);
    
public voidtestEncode_Normal()

        String input = "ab\u5D14\u654F";
        byte[] output = new byte[] { 97, 98, -27, -76, -108, -26, -107, -113 };
        internalTestEncode(input, output);