All Packages Class Hierarchy This Package Previous Next Index
Class iaik.asn1.BIT_STRING
java.lang.Object
|
+----iaik.asn1.ASN1Object
|
+----iaik.asn1.BIT_STRING
- public class BIT_STRING
- extends ASN1Object
This class implements the native ASN.1 type "BIT STRING".
-
bits_not_valid
- Number of bits not valid in the byte array of bits.
-
value
- The bits of the BitString in a byte array.
-
BIT_STRING()
- Creates a new BitString.
-
BIT_STRING(byte[])
- Create a new BitString where all bits of the byte array are valid.
-
BIT_STRING(byte[], int)
- Creates a new BitString from an array and an integer.
-
bitsNotValid()
- Returns the number of bits which are not valid.
-
decode(int, int, DerDecodeInputStream)
- Decodes the next available data from the DerDecodeInputStream.
-
encode(DerEncodeOutputStream)
- DER encodes this ASN1Object and write the result to the DerEncodeOutputStream.
-
getValue()
- Returns the value of this BIT_STRING as a byte array.
-
init()
- Initialize the object factory method.
-
setValue(Object)
- Sets the value of this object to value.
-
toString()
- Returns a string that represents the contents of this BitString.
bits_not_valid
protected int bits_not_valid
- Number of bits not valid in the byte array of bits.
value
protected byte value[]
- The bits of the BitString in a byte array.
BIT_STRING
protected BIT_STRING()
- Creates a new BitString. Called by the OBJECTFactory.
BIT_STRING
public BIT_STRING(byte array[],
int bitsNotValid)
- Creates a new BitString from an array and an integer.
- Parameters:
- array - the bits in a byte array
- bitsNotValid - number of bits which are not valid in the last byte
BIT_STRING
public BIT_STRING(byte array[])
- Create a new BitString where all bits of the byte array are valid.
- Parameters:
- bits - the bits in a byte array
init
protected static void init()
- Initialize the object factory method.
getValue
public Object getValue()
- Returns the value of this BIT_STRING as a byte array.
- Returns:
- the bits of this BIT_STRING in a byte array
- Overrides:
- getValue in class ASN1Object
setValue
public void setValue(Object object)
- Sets the value of this object to value.
- Overrides:
- setValue in class ASN1Object
bitsNotValid
public int bitsNotValid()
- Returns the number of bits which are not valid.
- Returns:
- the number of bits which are not valid
encode
protected void encode(DerEncodeOutputStream os)
- DER encodes this ASN1Object and write the result to the DerEncodeOutputStream.
- Parameters:
- os - the output stream to which to write the data
- Overrides:
- encode in class ASN1Object
decode
protected void decode(int tag,
int length,
DerDecodeInputStream is) throws IOException
- Decodes the next available data from the DerDecodeInputStream.
- Parameters:
- tag - the full tag of the current ASN1Object
- length - the length of the ASN1Object which shall be decoded
- Throws: IOException
- if there is a problem with the DerDecodeInputStream
- Overrides:
- decode in class ASN1Object
toString
public String toString()
- Returns a string that represents the contents of this BitString.
- Returns:
- the string representation
- Overrides:
- toString in class ASN1Object
All Packages Class Hierarchy This Package Previous Next Index