code: private void encodeThis() throws IOException {
          if (notBefore == null && notAfter == null) {
              this.extensionValue = null;
              return;
          }
          DerOutputStream seq = new DerOutputStream();
  
          DerOutputStream tagged = new DerOutputStream();
          if (notBefore != null) {
              DerOutputStream tmp = new DerOutputStream();
              tmp.putGeneralizedTime(notBefore);
              tagged.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,
                                   false, TAG_BEFORE), tmp);
          }
          if (notAfter != null) {
              DerOutputStream tmp = new DerOutputStream();
              tmp.putGeneralizedTime(notAfter);
              tagged.writeImplicit(DerValue.createTag(DerValue.TAG_CONTEXT,
                                   false, TAG_AFTER), tmp);
          }
          seq.write(DerValue.tag_Sequence, tagged);
          this.extensionValue = seq.toByteArray();
      }
docs: Encode this extension value.