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

UTF16BECharsetTest

public class UTF16BECharsetTest extends AbstractCharsetTestCase
Test UTF-16BE.

Fields Summary
Constructors Summary
public UTF16BECharsetTest()
Constructor.

        super("UTF-16BE", new String[] { "X-UTF-16BE", "UTF_16BE" },
                true, true); // "ISO-10646-UCS-2"
    
Methods Summary
public voidtestDecode_Normal()

        byte[] input = new byte[] { 0, 97, 0, 98, 93, 20, 101, 79 };
        char[] output = "ab\u5D14\u654F".toCharArray();
        internalTestDecode(input, output);
    
public voidtestEncode_Normal()

        String input = "ab\u5D14\u654F";
        byte[] output = new byte[] { 0, 97, 0, 98, 93, 20, 101, 79 };
        internalTestEncode(input, output);