Here you can find the source of jisx0208ToString(byte[] b, int offset, int len)
public static String jisx0208ToString(byte[] b, int offset, int len)
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String jisx0208ToString(byte[] b) { return jisx0208ToString(b, 0, b.length); }//from w w w .ja v a 2 s. c o m public static String jisx0208ToString(byte[] b, int offset, int len) { byte[] buf = new byte[len]; // JISX0208 -> EUC-JP for (int i = 0; i < len; i++) { if (b[offset + i] != '\0') { buf[i] = (byte) (b[offset + i] | 0x80); } else { buf[i] = '\0'; } } String str = null; try { str = new String(buf, "EUC-JP"); } catch (UnsupportedEncodingException e) { str = new String(buf); } return str.trim(); } }