System.out.println("--Test GB18030 to Unicode --PASSED");
System.out.println("--Test callback GB18030 to Unicode --PASSED");
      public static void testCallback(String encoding){                {            char[] gbSource = {                        0x81,0x36,0xDE,0x36                         ,0x81,0x36,0xDE,0x37                         ,0x81,0x36,0xDE,0x38                         ,0xe3,0x32,0x9a,0x36            };            try{                char[] myTarget = new char[gbSource.length];                byte[] mySource = new byte[gbSource.length];                char[] subChars = {'P','I'};                int i=0;                while(i<gbSource.length){                    mySource[i]=(byte) gbSource[i];                    i++;                }                ByteToCharConverter gbConv = ByteToCharConverterICU.createConverter(encoding);                gbConv.setSubstitutionChars(subChars);                gbConv.convert(mySource, 0, mySource.length, myTarget, 0, myTarget.length);                gbConv.setSubstitutionMode(false);//                gbConv.convert(mySource, 0, mySource.length, myTarget, 0, myTarget.length);                i=0;                char[] expectedResult = {'\u22A6','\u22A7','\u22A8','\u0050','\u0049',};                boolean passed =true;                while(myTarget[i]!='\0'){                    if(myTarget[i]!= expectedResult[i]){                        StringBuffer temp = new StringBuffer("Error:  Expected: ");                        temp.append(Integer.toHexString(expectedResult[i]));                        temp.append(" Got: ");                        temp.append(Integer.toHexString(myTarget[i]));                        System.out.println(temp);                        passed =false;                    }                    i++;                }                if(passed){                    System.out.println("--Test GB18030 to Unicode --PASSED");                }else{                    System.out.println("--Test GB18030 to Unicode  --FAILED");                }                            }            catch(UnsupportedEncodingException ueEx){                System.out.println(ueEx.toString());            }            catch (MalformedInputException miEx){                System.out.println(miEx.toString());            }            catch (UnknownCharacterException ucEx){                System.out.println(ucEx.toString());            }            catch (ConversionBufferFullException cbfEx){                System.out.println(cbfEx.toString());            }                                 }     }