java 代码 :4字节有效时长字节序为LSB例子:时间戳:AB F1 7C 60十进制:1618801067 转为16进制为:60 7C F1 AB
byte[] timestamp = new byte[] {(byte) 0x60, (byte) 0x7C, (byte) 0xF1, (byte) 0xAB}; int seconds = ByteBuffer.wrap(timestamp).order(ByteOrder.LITTLE_ENDIAN).getInt(); System.out.println("Timestamp in seconds: " + seconds); // Output: Timestamp in seconds: 1618801067
原文地址: https://www.cveoy.top/t/topic/bsJx 著作权归作者所有。请勿转载和采集!