/** * 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; } }
@Override public String toString() { return this.getClass().getName() + "(bundleIdPrefix=" + Packet.binToHex(this.bundleIdPrefix) + ", offset=" + this.offset + ", messageTime=" + this.messageTime + ")"; }
public String bundleIdPrefixHex() { return Packet.binToHex(this.bundleIdPrefix); }