复制代码
public class main {
public class main {
public static void main(String[] args) {
// TODO Auto-generated method stub
//简单测试了short[] 转byte[],其他类似;
BytesTransUtil bytesTransUtil = BytesTransUtil.getInstance();
int[] sTest = { 12345678, 87654321 };
byte[] byteShort = bytesTransUtil.Ints2Bytes(sTest);
int[] sTemp = bytesTransUtil.Bytes2Ints(byteShort);
System.out.println("short[0] = " + sTemp[0] + " short[1] = " + sTemp[1]);
}
}










