FileDocCategorySizeDatePackage
InfoAccessSyntax.javaAPI DocAndroid 1.5 API4680Wed May 06 22:41:06 BST 2009org.apache.harmony.security.x509

InfoAccessSyntax

public class InfoAccessSyntax extends ExtensionValue
The class encapsulates the ASN.1 DER encoding/decoding work with the SubjectInfoAccessSyntax and AuthorityInfoAccessSyntax which are a part of X.509 framework (as specified in RFC 3280 - Internet X.509 Public Key Infrastructure. Certificate and Certificate Revocation List (CRL) Profile. http://www.ietf.org/rfc/rfc3280.txt): SubjectInfoAccessSyntax ::= SEQUENCE SIZE (1..MAX) OF AccessDescriptions AuthorityInfoAccessSyntax ::= SEQUENCE SIZE (1..MAX) OF AccessDescriptions AccessDescription ::= SEQUENCE { accessMethod OBJECT IDENTIFIER, accessLocation GeneralName }

Fields Summary
private final List
accessDescriptions
public static final org.apache.harmony.security.asn1.ASN1Type
ASN1
ASN.1 DER X.509 AuthorityInfoAccessSyntax and SubjectInfoAccessSyntax encoder/decoder class.
Constructors Summary
public InfoAccessSyntax(List accessDescriptions)

        this(accessDescriptions, null);
    
private InfoAccessSyntax(List accessDescriptions, byte[] encoding)

        if (accessDescriptions == null || accessDescriptions.isEmpty()) {
            // "AccessDescriptions list is null or empty"
            throw new IOException(Messages.getString("security.1A3")); //$NON-NLS-1$
        }
        this.accessDescriptions = accessDescriptions;
        this.encoding = encoding;
    
Methods Summary
public static org.apache.harmony.security.x509.InfoAccessSyntaxdecode(byte[] encoding)

        return ((InfoAccessSyntax) ASN1.decode(encoding));
    
public voiddumpValue(java.lang.StringBuffer buffer, java.lang.String prefix)
Places the string representation of extension value into the StringBuffer object.

        buffer.append(prefix).append("AccessDescriptions:\n"); //$NON-NLS-1$
        if (accessDescriptions == null || accessDescriptions.isEmpty()) {
            buffer.append("NULL\n"); //$NON-NLS-1$
        } else {
            Iterator itr = accessDescriptions.iterator();
            while (itr.hasNext()) {
                buffer.append(itr.next().toString());
            }
        }
    
public java.util.ListgetAccessDescriptions()

        return new ArrayList(accessDescriptions);
    
public byte[]getEncoded()
Returns ASN.1 encoded form of this X.509 InfoAccessSyntax.

return
a byte array containing ASN.1 encoded form.

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;
    
public java.lang.StringtoString()

        StringBuffer res = new StringBuffer();
        res.append("\n---- InfoAccessSyntax:"); //$NON-NLS-1$
        if (accessDescriptions != null) {
            for (Iterator it = accessDescriptions.iterator(); it.hasNext();) {
                res.append('\n");
                res.append(it.next());
            }
        }
        res.append("\n---- InfoAccessSyntax END\n"); //$NON-NLS-1$
        return res.toString();