コード例 #1
0
 @Test
 public void test() {
   byte[] fromObj = {113, 123, 124, 23};
   byte[] result = Helper.byteArrayCut(fromObj, 0, 2);
   for (int i = 0; i < 2; i++) {
     System.out.println(result[i]);
   }
   byte[] result2 = Helper.byteArrayCut(fromObj, 2, 2);
   for (int i = 0; i < 2; i++) {
     System.out.println(result2[i]);
   }
 }
コード例 #2
0
 public byte[] getToAdress() {
   byte[] toAdress = Helper.byteArrayCut(data, FROM_ADDRESS_LENGTH, TO_ADDRESS_LENGTH);
   return toAdress;
 }
コード例 #3
0
 public InstructionTaskKind getTaskKind() {
   int pos = FROM_ADDRESS_LENGTH + TO_ADDRESS_LENGTH;
   byte[] kind = Helper.byteArrayCut(data, pos, TASK_KIND_LENGTH);
   return TaskMap.getTaskKind(kind);
 }
コード例 #4
0
 public byte[] getFromAddress() {
   byte[] fromAdress = Helper.byteArrayCut(data, 0, FROM_ADDRESS_LENGTH);
   return fromAdress;
 }