FileDocCategorySizeDatePackage
ASN1Boolean.javaAPI DocAndroid 1.5 API2726Wed May 06 22:41:06 BST 2009org.apache.harmony.security.asn1

ASN1Boolean

public class ASN1Boolean extends ASN1Primitive
This class represents ASN.1 Boolean type.
see
ASN.1

Fields Summary
private static final ASN1Boolean
ASN1
Constructors Summary
public ASN1Boolean()
Constructs ASN.1 Boolean type The constructor is provided for inheritance purposes when there is a need to create a custom ASN.1 Boolean type. To get a default implementation it is recommended to use getInstance() method.


                                             
      
        super(TAG_BOOLEAN);
    
Methods Summary
public java.lang.Objectdecode(BerInputStream in)

        in.readBoolean();

        if (in.isVerify) {
            return null;
        }
        return getDecodedObject(in);
    
public voidencodeContent(BerOutputStream out)

        out.encodeBoolean();
    
public java.lang.ObjectgetDecodedObject(BerInputStream in)
Extracts Boolean object from BER input stream.

param
in - BER input stream
return
java.lang.Boolean object

        if (in.buffer[in.contentOffset] == 0) {
            return Boolean.FALSE;
        }
        return Boolean.TRUE;
    
public static org.apache.harmony.security.asn1.ASN1BooleangetInstance()
Returns ASN.1 Boolean type default implementation The default implementation works with encoding that is represented as Boolean object.

return
ASN.1 Boolean type default implementation

        return ASN1;
    
public voidsetEncodingContent(BerOutputStream out)

        out.length = 1;