1b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallampackage org.bouncycastle.asn1; 2b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 3b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallamimport java.util.Vector; 4b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 5b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam/** 6b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam * a general class for building up a vector of DER encodable objects - 7b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam * this will eventually be superceded by ASN1EncodableVector so you should 8b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam * use that class in preference. 9b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam */ 10b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallampublic class DEREncodableVector 11b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam{ 12c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom Vector v = new Vector(); 13b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 14c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom /** 15c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom * @deprecated use ASN1EncodableVector instead. 16c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom */ 17c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom public DEREncodableVector() 18c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom { 19c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 20c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom } 21c37f4a04ef89e73a39a59f3c5a179af8c8ab5974Brian Carlstrom 22b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam public void add( 23b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam DEREncodable obj) 24b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 25b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam v.addElement(obj); 26b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 27b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 28b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam public DEREncodable get( 29b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam int i) 30b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 31b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam return (DEREncodable)v.elementAt(i); 32b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 33b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam 34b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam public int size() 35b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam { 36b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam return v.size(); 37b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam } 38b61a96e7ef1a78acf013bbf08fe537e5b5f129caPeter Hallam} 39