if (dataStr == null) return null;
    public static String encode(byte[] dataStr) {        StringWriter w = new StringWriter();        for (int i =0;i<dataStr.length;i++)        {            int b = dataStr[i];            w.write(hex[((b >> 4) & 0xF)]);            w.write(hex[((b >> 0) & 0xF)]);        }        return w.toString();    }