Represents an ASN.1 BIT STRING value.

Parameter types of the Asn1Value super class are for octet string contents and number of bits. The last octet in the octet string contents may contain unused bits.

no subtypes hierarchy

Initializer
BitString(Byte[] encoded, IdentityInfo identityInfo, Integer lengthOctetsOffset, Integer contentOctetsOffset, Boolean violatesDer, Integer unusedBits)
Parameters:
  • unusedBits

    The number of unused bits in the last contents octet.

Attributes
asn1ValueStringshared actual String asn1ValueString

still not decided when to output what

bytesshared Byte[] bytes

The bits in byte list form. In the last byte, only the 8-unusedBits most significant bits are part of the bit string.

defaultTagshared actual Tag defaultTag

The tag that an instance of this class has when used without tag in a specification.

numberOfBitsshared Integer numberOfBits

The number of bits in this bit string.

unusedBitsshared Integer unusedBits

The number of unused bits in the last contents octet.

Inherited Attributes
Attributes inherited from: Asn1Value<Value>
Attributes inherited from: GenericAsn1Value
Attributes inherited from: Object
hash, string
Methods
decodeshared actual [Byte[], Integer] decode()

Subclasses must implement this if the decoded value is not stored in the instance and thus must be decoded each time Asn1Value.val is called.

If the decoded value is stored in the instance, then this method need not be refined.

Inherited Methods
Methods inherited from: Asn1Value<Value>
Methods inherited from: Object
equals