Ejemplo n.º 1
0
 @Test
 public void testFloat() throws IOException {
   String hexStr = "41BB3333";
   byte[] data = Utils.getByteArray(hexStr);
   ByteDecoder byteDecoder = new ByteDecoder(data);
   double t = byteDecoder.readFloat(4);
   System.out.println(t);
 }
Ejemplo n.º 2
0
 @Test
 public void testDouble() throws IOException {
   String hexStr = "c666666666666666";
   byte[] data = Utils.getByteArray(hexStr);
   ByteDecoder byteDecoder = new ByteDecoder(data);
   double t = byteDecoder.readDouble(8);
   System.out.println(t);
 }
 @Override
 public String toString() {
   return Utils.buildString(this, ToStringStyle.DEFAULT_STYLE, new String[] {"messageBody"});
 }