@Test public void testDeserialize() throws DeserializationException { EncapSecurityPayload esp = deserializer.deserialize(bytePacket, 0, bytePacket.length); assertThat(esp.getSecurityParamIndex(), is(0x13572468)); assertThat(esp.getSequence(), is(0xffff00)); }
@Override public IPacket deserialize(byte[] data, int offset, int length) { final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); this.securityParamIndex = bb.getInt(); this.sequence = bb.getInt(); this.payload = new Data(); this.payload.deserialize(data, bb.position(), bb.limit() - bb.position()); this.payload.setParent(this); return this; }
EncapSecurityPayload extends BasePacket { @Override public IPacket deserialize(byte[] data, int offset, int length) { final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); this.securityParamIndex = bb.getInt(); this.sequence = bb.getInt(); this.payload = new Data(); this.payload.deserialize(data, bb.position(), bb.limit() - bb.position()); this.payload.setParent(this); return this; } }
EncapSecurityPayload extends BasePacket { @Override public IPacket deserialize(byte[] data, int offset, int length) { final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); this.securityParamIndex = bb.getInt(); this.sequence = bb.getInt(); this.payload = new Data(); this.payload.deserialize(data, bb.position(), bb.limit() - bb.position()); this.payload.setParent(this); return this; }  }
EncapSecurityPayload extends BasePacket { @Override public IPacket deserialize(byte[] data, int offset, int length) { final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); this.securityParamIndex = bb.getInt(); this.sequence = bb.getInt(); this.payload = new Data(); this.payload.deserialize(data, bb.position(), bb.limit() - bb.position()); this.payload.setParent(this); return this; }  int getSecurityParamIndex(); EncapSecurityPayload setSecurityParamIndex(final int securityParamIndex); int getSequence(); EncapSecurityPayload setSequence(final int sequence); @Override byte[] serialize(); @Override IPacket deserialize(byte[] data, int offset, int length); @Override int hashCode(); @Override boolean equals(final Object obj); static Deserializer<EncapSecurityPayload> deserializer(); @Override String toString(); }
EncapSecurityPayload extends BasePacket { @Override public IPacket deserialize(byte[] data, int offset, int length) { final ByteBuffer bb = ByteBuffer.wrap(data, offset, length); this.securityParamIndex = bb.getInt(); this.sequence = bb.getInt(); this.payload = new Data(); this.payload.deserialize(data, bb.position(), bb.limit() - bb.position()); this.payload.setParent(this); return this; }  int getSecurityParamIndex(); EncapSecurityPayload setSecurityParamIndex(final int securityParamIndex); int getSequence(); EncapSecurityPayload setSequence(final int sequence); @Override byte[] serialize(); @Override IPacket deserialize(byte[] data, int offset, int length); @Override int hashCode(); @Override boolean equals(final Object obj); static Deserializer<EncapSecurityPayload> deserializer(); @Override String toString(); static final byte HEADER_LENGTH; }