public class TwoBytesHexFloatCodec extends Object implements BinaryCodec<Float>
算法: 2字节16进制对应的整数/10
e.g.
[02,22] = 0x222 = 546 , 546/10 = 54.6
[-1,-101] = 0xFF9B = -101 , -101/10 = -10.1
| 构造器和说明 |
|---|
TwoBytesHexFloatCodec() |
| 限定符和类型 | 方法和说明 |
|---|---|
Float |
decode(byte[] payload,
int offset) |
void |
encode(Float part,
byte[] payload,
int offset) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittransfertransferTopublic Float decode(byte[] payload, int offset)
decode 在接口中 BinaryDecoder<Float>public void encode(Float part, byte[] payload, int offset)
encode 在接口中 BinaryEncoder<Float>Copyright © 2019–2022. All rights reserved.