code: public void encode(OutputStream out) throws IOException {
          // Nothing for default
          if (version == V1) {
              return;
          }
          DerOutputStream tmp = new DerOutputStream();
          tmp.putInteger(version);
  
          DerOutputStream seq = new DerOutputStream();
          seq.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0),
                    tmp);
  
          out.write(seq.toByteArray());
      }
docs: Encode the CertificateVersion period in DER form to the stream.
  
  @param out the OutputStream to marshal the contents to.
  @exception IOException on errors.