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

  public  SyncRequestControl();
  public  SyncRequestControl(final Mode mode);
  public  SyncRequestControl(final Mode mode, final boolean critical);
  public  SyncRequestControl(final Mode mode, final byte[] value, final boolean critical);
  public  SyncRequestControl(final Mode mode, final byte[] value, final boolean hint, final boolean critical);

}