?? testmultibyteformat.jpage
字號:
byte[] multipleBytes = new byte[4];multipleBytes[0] = (byte) 0x01;multipleBytes[1] = (byte) 0x20;StringBuffer strBuf = new StringBuffer();int i =0;while(multipleBytes[i]!=0) { String str = Integer.toBinaryString(multipleBytes[i++]); if(str.length() < 7) { int zerosToPumpIn = 7 - str.length(); for (int j = 0; j < zerosToPumpIn; j++) { strBuf.append('0'); } } strBuf.append(str); }System.out.println(strBuf); System.out.println(Integer.valueOf(strBuf.toString(),2));Integer.toHexString(160)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -