< prev index next >

test/sun/nio/cs/OLD/TestIBMDB.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6843578
  27  * @summary Test old and new implementation of db charsets
  28  * @build IBM930_OLD IBM933_OLD IBM935_OLD IBM937_OLD IBM939_OLD IBM942_OLD IBM943_OLD IBM948_OLD IBM949_OLD IBM950_OLD IBM970_OLD IBM942C_OLD IBM943C_OLD IBM949C_OLD IBM1381_OLD IBM1383_OLD EUC_CN_OLD EUC_KR_OLD GBK_OLD Johab_OLD MS932_OLD MS936_OLD MS949_OLD MS950_OLD SJIS_OLD PCK_OLD EUC_JP_OLD EUC_JP_LINUX_OLD EUC_JP_Open_OLD

  29  * @run main TestIBMDB
  30  */
  31 
  32 import java.nio.charset.*;
  33 import java.nio.*;
  34 import java.util.*;
  35 
  36 public class TestIBMDB {
  37     static class Time {
  38         long t;
  39     }
  40     static int iteration = 200;
  41 
  42     static char[] decode(byte[] bb, Charset cs, boolean testDirect, Time t)
  43         throws Exception {
  44         String csn = cs.name();
  45         CharsetDecoder dec = cs.newDecoder();
  46         ByteBuffer bbf;
  47         CharBuffer cbf;
  48         if (testDirect) {




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6843578
  27  * @summary Test old and new implementation of db charsets
  28  * @build IBM930_OLD IBM933_OLD IBM935_OLD IBM937_OLD IBM939_OLD IBM942_OLD IBM943_OLD IBM948_OLD IBM949_OLD IBM950_OLD IBM970_OLD IBM942C_OLD IBM943C_OLD IBM949C_OLD IBM1381_OLD IBM1383_OLD EUC_CN_OLD EUC_KR_OLD GBK_OLD Johab_OLD MS932_OLD MS936_OLD MS949_OLD MS950_OLD SJIS_OLD PCK_OLD EUC_JP_OLD EUC_JP_LINUX_OLD EUC_JP_Open_OLD
  29  * @modules java.base/sun.nio.cs jdk.charsets/sun.nio.cs.ext
  30  * @run main TestIBMDB
  31  */
  32 
  33 import java.nio.charset.*;
  34 import java.nio.*;
  35 import java.util.*;
  36 
  37 public class TestIBMDB {
  38     static class Time {
  39         long t;
  40     }
  41     static int iteration = 200;
  42 
  43     static char[] decode(byte[] bb, Charset cs, boolean testDirect, Time t)
  44         throws Exception {
  45         String csn = cs.name();
  46         CharsetDecoder dec = cs.newDecoder();
  47         ByteBuffer bbf;
  48         CharBuffer cbf;
  49         if (testDirect) {


< prev index next >