lxw
2023-02-10 f978d4ecdf83cbf7c8b778f1362b86be5aa510bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.whyc.mcp;
 
import com.whyc.util.ComBase;
 
import java.nio.ByteBuffer;
 
public class TestTime {
 
    public static final int BYTE_LEN = 3;
 
    public int hour;            //时
    public int minute;            //分
    public int second;            //秒
    public void setTestTime(ByteBuffer bf) {
        if(bf.limit() < BYTE_LEN) {
            return;
        }
        this.hour = ComBase.changeByteToInt(bf.get());
        this.minute = ComBase.changeByteToInt(bf.get());
        this.second = ComBase.changeByteToInt(bf.get());
    }
}