< prev index next >

src/java.base/share/classes/sun/security/x509/CertificatePolicySet.java

Print this page




  41 public class CertificatePolicySet {
  42 
  43     private final Vector<CertificatePolicyId> ids;
  44 
  45     /**
  46      * The default constructor for this class.
  47      *
  48      * @param ids the sequence of CertificatePolicyId's.
  49      */
  50     public CertificatePolicySet(Vector<CertificatePolicyId> ids) {
  51         this.ids = ids;
  52     }
  53 
  54     /**
  55      * Create the object from the DerValue.
  56      *
  57      * @param in the passed DerInputStream.
  58      * @exception IOException on decoding errors.
  59      */
  60     public CertificatePolicySet(DerInputStream in) throws IOException {
  61         ids = new Vector<CertificatePolicyId>();
  62         DerValue[] seq = in.getSequence(5);
  63 
  64         for (int i = 0; i < seq.length; i++) {
  65             CertificatePolicyId id = new CertificatePolicyId(seq[i]);
  66             ids.addElement(id);
  67         }
  68     }
  69 
  70     /**
  71      * Return printable form of the object.
  72      */
  73     public String toString() {
  74         String s = "CertificatePolicySet:[\n"
  75                  + ids.toString()
  76                  + "]\n";
  77 
  78         return (s);
  79     }
  80 
  81     /**




  41 public class CertificatePolicySet {
  42 
  43     private final Vector<CertificatePolicyId> ids;
  44 
  45     /**
  46      * The default constructor for this class.
  47      *
  48      * @param ids the sequence of CertificatePolicyId's.
  49      */
  50     public CertificatePolicySet(Vector<CertificatePolicyId> ids) {
  51         this.ids = ids;
  52     }
  53 
  54     /**
  55      * Create the object from the DerValue.
  56      *
  57      * @param in the passed DerInputStream.
  58      * @exception IOException on decoding errors.
  59      */
  60     public CertificatePolicySet(DerInputStream in) throws IOException {
  61         ids = new Vector<>();
  62         DerValue[] seq = in.getSequence(5);
  63 
  64         for (int i = 0; i < seq.length; i++) {
  65             CertificatePolicyId id = new CertificatePolicyId(seq[i]);
  66             ids.addElement(id);
  67         }
  68     }
  69 
  70     /**
  71      * Return printable form of the object.
  72      */
  73     public String toString() {
  74         String s = "CertificatePolicySet:[\n"
  75                  + ids.toString()
  76                  + "]\n";
  77 
  78         return (s);
  79     }
  80 
  81     /**


< prev index next >