fctom1215
2020-02-14 806ed6836b84fbea87d19a0cb4414e120dd9c049
im_lib/src/main/java/com/anyun/im_lib/util/ByteUtil.java
@@ -1,6 +1,7 @@
package com.anyun.im_lib.util;
import android.text.TextUtils;
import android.util.Log;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
@@ -15,7 +16,7 @@
 */
public class ByteUtil {
private static final String TAG = "ByteUtil";
    /**
     * @功能: BCD码转为10进制串(阿拉伯数据)
     * @参数: BCD码
@@ -69,6 +70,7 @@
            byte b = (byte) a;
            bbt[p] = b;
        }
        Log.i(TAG, "str2Bcd: "+byte2HexStr(bbt));
        return bbt;
    }
@@ -206,4 +208,10 @@
        System.out.println(byte2HexStr(shortGetBytes((short) b)));
    }
    public static byte[] subArray(byte[] srcBytes, int begin, int length) {
        byte[] bytes = new byte[length];
        System.arraycopy(srcBytes,begin,bytes,0,length);
        Log.i(TAG, "subArray: "+byte2HexStr(bytes));
        return bytes;
    }
}