62,614
社区成员
发帖
与我相关
我的任务
分享
FileInpuetStream fis = new FileInputStream(your_file);
int c;
while ((c=fis.read()) != -1) {
if (c == 0x2a) {
c = fis.read();
if (c == -1) {break;}
if (c == 0x93) {
byte[] b = new byte[4];
c = fis.read(b);
if (c == -1) {break;}
long l = 0;
for (int i=0; i<b.length; i++) {
l = (l<<4) | b[i]; //不知道存储的是从高位到低位还是低位到高位,LZ自己调整吧
}
System.out.println(l);
}
}
}
DataInputStream dis = new DataInputStream( is);
while (true){
while (dis.readByte()!=0x2F);
if (dis.readByte()==(byte)0x93){
long number = dis.readInt() & 0xFFFFFFFFL;
System.out.println("找到一个数:" + number);
}
}
static void t7(){
byte[] bys = new byte[]{0x00,0x15,(byte) 0x88,(byte) 0xd2};
System.out.println(Utility.byte2Int(bys));
}