public abstract class ASN1BitString extends ASN1Primitive implements ASN1String
Modifier and Type | Field and Description |
---|---|
protected byte[] |
data |
protected int |
padBits |
Constructor and Description |
---|
ASN1BitString(byte[] data,
int padBits)
Base constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
asn1Equals(ASN1Primitive o)
Equality (similarity) comparison for two ASN1Primitive objects.
|
protected static byte[] |
derForm(byte[] data,
int padBits) |
byte[] |
getBytes() |
protected static byte[] |
getBytes(int bitString) |
ASN1Primitive |
getLoadedObject() |
byte[] |
getOctets()
Return the octets contained in this BIT STRING, checking that this BIT STRING really
does represent an octet aligned string.
|
int |
getPadBits() |
protected static int |
getPadBits(int bitString) |
java.lang.String |
getString()
Return a String representation of this BIT STRING
|
int |
hashCode() |
int |
intValue() |
java.lang.String |
toString() |
equals, fromByteArray, toASN1Primitive
getEncoded, getEncoded, hasEncodedTagValue
public ASN1BitString(byte[] data, int padBits)
data
- the octets making up the bit string.padBits
- the number of extra bits at the end of the string.protected static int getPadBits(int bitString)
bitString
- an int containing the BIT STRINGprotected static byte[] getBytes(int bitString)
bitString
- an int containing the BIT STRINGpublic java.lang.String getString()
getString
in interface ASN1String
public int intValue()
public byte[] getOctets()
public byte[] getBytes()
public int getPadBits()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class ASN1Primitive
protected boolean asn1Equals(ASN1Primitive o)
ASN1Primitive
protected static byte[] derForm(byte[] data, int padBits)
public ASN1Primitive getLoadedObject()