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

GeneralSubtree

public class GeneralSubtree extends Object
The class encapsulates the ASN.1 DER encoding/decoding work with the GeneralSubtree structure which is a part of X.509 certificate: (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):

GeneralSubtree ::= SEQUENCE {
base GeneralName,
minimum [0] BaseDistance DEFAULT 0,
maximum [1] BaseDistance OPTIONAL }

BaseDistance ::= INTEGER (0..MAX)

see
org.apache.harmony.security.x509.NameConstraints
see
org.apache.harmony.security.x509.GeneralName

Fields Summary
private final GeneralName
base
private final int
minimum
private final int
maximum
private byte[]
encoding
public static final org.apache.harmony.security.asn1.ASN1Sequence
ASN1
ASN.1 DER X.509 GeneralSubtree encoder/decoder class.
Constructors Summary
public GeneralSubtree(GeneralName base)
TODO

param
base: GeneralName

        this(base, 0, -1);
    
public GeneralSubtree(GeneralName base, int minimum)
TODO

param
base: GeneralName
param
minimum: int

        this(base, minimum, -1);
    
public GeneralSubtree(GeneralName base, int minimum, int maximum)
TODO

param
base: GeneralName
param
minimum: int
param
maximum: int

        this.base = base;
        this.minimum = minimum;
        this.maximum = maximum;
    
Methods Summary
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("General Subtree: [\n"); //$NON-NLS-1$
        buffer.append(prefix).append("  base: ").append(base).append('\n"); //$NON-NLS-1$
        buffer.append(prefix).append("  minimum: ") //$NON-NLS-1$
            .append(minimum).append('\n");
        if (maximum >= 0) {
            buffer.append(prefix).append("  maximum: ") //$NON-NLS-1$
                .append(maximum).append('\n");
        }
        buffer.append(prefix).append("]\n"); //$NON-NLS-1$
    
public GeneralNamegetBase()
Returns the value of base field of the structure.

return
base

        return base;
    
public byte[]getEncoded()
Returns ASN.1 encoded form of this X.509 GeneralSubtree value.

return
a byte array containing ASN.1 encode form.

        if (encoding == null) {
            encoding = ASN1.encode(this);
        }
        return encoding;
    
public intgetMaximum()
Returns the value of maximum field of the structure.

return
maximum

        return maximum;
    
public intgetMinimum()
Returns the value of minimum field of the structure.

return
minimum

        return minimum;