class 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;
    }

}