01: package org.bouncycastle.asn1.esf;
02:
03: import org.bouncycastle.asn1.DERIA5String;
04: import org.bouncycastle.asn1.DERObject;
05:
06: public class SPuri {
07: private DERIA5String uri;
08:
09: public static SPuri getInstance(Object obj) {
10: if (obj instanceof SPuri) {
11: return (SPuri) obj;
12: } else if (obj instanceof DERIA5String) {
13: return new SPuri((DERIA5String) obj);
14: }
15:
16: throw new IllegalArgumentException(
17: "unknown object in 'SPuri' factory: "
18: + obj.getClass().getName() + ".");
19: }
20:
21: public SPuri(DERIA5String uri) {
22: this .uri = uri;
23: }
24:
25: public DERIA5String getUri() {
26: return uri;
27: }
28:
29: /**
30: * <pre>
31: * SPuri ::= IA5String
32: * </pre>
33: */
34: public DERObject toASN1Object() {
35: return uri.getDERObject();
36: }
37: }
|