Example #1
0
 /**
  * Convenience method to check if a given bundle (manifest) ID matches this ACK.
  *
  * @author Andrew Bettison <*****@*****.**>
  */
 public boolean matches(String bundleIdHex) {
   byte[] bundleIdPrefix = new byte[BUNDLE_ID_PREFIX_BYTES];
   try {
     Packet.hexToBin(bundleIdHex.substring(0, bundleIdPrefix.length * 2), bundleIdPrefix);
     return Arrays.equals(bundleIdPrefix, this.bundleIdPrefix);
   } catch (Packet.HexDecodeException e) {
     return false;
   }
 }
Example #2
0
 @Override
 public String toString() {
   return this.getClass().getName()
       + "(bundleIdPrefix="
       + Packet.binToHex(this.bundleIdPrefix)
       + ", offset="
       + this.offset
       + ", messageTime="
       + this.messageTime
       + ")";
 }
Example #3
0
 public String bundleIdPrefixHex() {
   return Packet.binToHex(this.bundleIdPrefix);
 }