code: public void encode(DerOutputStream out) throws IOException {
          if (gni != null) {
              // This OtherName has a supported class
              gni.encode(out);
              return;
          } else {
              // This OtherName has no supporting class
              DerOutputStream tmp = new DerOutputStream();
              tmp.putOID(oid);
              tmp.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, TAG_VALUE), nameValue);
              out.write(DerValue.tag_Sequence, tmp);
          }
      }
docs: Encode the Other name into the DerOutputStream.
  
  @param out the DER stream to encode the Other-Name to.
  @exception IOException on encoding errors.