Package sun.net.idn

Examples of sun.net.idn.StringPrep


        }
    }

    public static void TestNamePrepConformance() throws Exception {
        InputStream stream = StringPrep.class.getResourceAsStream("uidna.spp");
        StringPrep namePrep = new StringPrep(stream);
        stream.close();
        int i;
        for(i=0; i<TestData.conformanceTestCases.length;i++){
            TestData.ConformanceTestCase testCase = TestData.conformanceTestCases[i];
            try{
                UCharacterIterator iter = UCharacterIterator.getInstance(testCase.input);
                StringBuffer output = namePrep.prepare(iter, testCase.flags);
                if(testCase.output !=null && output!=null && !testCase.output.equals(output.toString())){
                    fail("Did not get the expected output. Expected: " + prettify(testCase.output)+
                            " Got: "+ prettify(output.toString()) );
                }
            } catch(ParseException ex) {
View Full Code Here

TOP

Related Classes of sun.net.idn.StringPrep

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.