@Test(groups = "control", dataProvider = "request") public void decode(final byte[] berValue, final SyncRequestControl expected) throws Exception { Assert.assertEquals(expected.encode(), berValue); }
@Override public byte[] encode() { final ConstructedDEREncoder se; if (getCookie() != null) { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new OctetStringType(getCookie()), new BooleanType(getReloadHint())); } else { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new BooleanType(getReloadHint())); } return se.encode(); }
SyncRequestControl extends AbstractControl implements RequestControl { @Override public byte[] encode() { final ConstructedDEREncoder se; if (getCookie() != null) { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new OctetStringType(getCookie()), new BooleanType(getReloadHint())); } else { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new BooleanType(getReloadHint())); } return se.encode(); } }
SyncRequestControl extends AbstractControl implements RequestControl { @Override public byte[] encode() { final ConstructedDEREncoder se; if (getCookie() != null) { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new OctetStringType(getCookie()), new BooleanType(getReloadHint())); } else { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new BooleanType(getReloadHint())); } return se.encode(); } SyncRequestControl();  SyncRequestControl(final Mode mode);  SyncRequestControl(final Mode mode, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean hint, final boolean critical); }
SyncRequestControl extends AbstractControl implements RequestControl { @Override public byte[] encode() { final ConstructedDEREncoder se; if (getCookie() != null) { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new OctetStringType(getCookie()), new BooleanType(getReloadHint())); } else { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new BooleanType(getReloadHint())); } return se.encode(); } SyncRequestControl();  SyncRequestControl(final Mode mode);  SyncRequestControl(final Mode mode, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean hint, final boolean critical); @Override boolean hasValue(); Mode getRequestMode(); void setRequestMode(final Mode mode); byte[] getCookie(); void setCookie(final byte[] value); boolean getReloadHint(); void setReloadHint(final boolean b); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override byte[] encode(); }
SyncRequestControl extends AbstractControl implements RequestControl { @Override public byte[] encode() { final ConstructedDEREncoder se; if (getCookie() != null) { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new OctetStringType(getCookie()), new BooleanType(getReloadHint())); } else { se = new ConstructedDEREncoder( UniversalDERTag.SEQ, new IntegerType(getRequestMode().value()), new BooleanType(getReloadHint())); } return se.encode(); } SyncRequestControl();  SyncRequestControl(final Mode mode);  SyncRequestControl(final Mode mode, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean critical);  SyncRequestControl(final Mode mode, final byte[] value, final boolean hint, final boolean critical); @Override boolean hasValue(); Mode getRequestMode(); void setRequestMode(final Mode mode); byte[] getCookie(); void setCookie(final byte[] value); boolean getReloadHint(); void setReloadHint(final boolean b); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString(); @Override byte[] encode(); static final String OID; }