public abstract class ASN1BitString extends ASN1Primitive implements ASN1String, ASN1BitStringParser
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getBitStream()
Return an InputStream representing the contents of the BIT STRING.
|
byte[] |
getBytes() |
protected static byte[] |
getBytes(int bitString) |
static ASN1BitString |
getInstance(ASN1TaggedObject taggedObject,
boolean explicit) |
static ASN1BitString |
getInstance(java.lang.Object obj) |
ASN1Primitive |
getLoadedObject()
Get the in-memory representation of the ASN.1 object.
|
byte[] |
getOctets()
Return the octets contained in this BIT STRING, checking that this BIT STRING really
does represent an octet aligned string.
|
java.io.InputStream |
getOctetStream()
Return an InputStream representing the contents of the BIT STRING, where the
content is expected to be octet-aligned (this will be automatically checked
during parsing).
|
int |
getPadBits()
Return the number of pad bits, if any, in the final byte, if any, read from
ASN1BitStringParser.getBitStream() . |
protected static int |
getPadBits(int bitString) |
java.lang.String |
getString()
Return a String representation of this BIT STRING
|
int |
hashCode() |
int |
intValue() |
ASN1BitStringParser |
parser() |
java.lang.String |
toString() |
encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1Primitive
getEncoded, getEncoded, hasEncodedTagValue
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
toASN1Primitive
public static ASN1BitString getInstance(java.lang.Object obj)
public static ASN1BitString getInstance(ASN1TaggedObject taggedObject, boolean explicit)
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.io.InputStream getBitStream() throws java.io.IOException
ASN1BitStringParser
ASN1BitStringParser.getPadBits()
.getBitStream
in interface ASN1BitStringParser
java.io.IOException
public java.io.InputStream getOctetStream() throws java.io.IOException
ASN1BitStringParser
getOctetStream
in interface ASN1BitStringParser
java.io.IOException
public ASN1BitStringParser parser()
public java.lang.String getString()
getString
in interface ASN1String
public int intValue()
public byte[] getOctets()
public byte[] getBytes()
public int getPadBits()
ASN1BitStringParser
ASN1BitStringParser.getBitStream()
. This number is in the range zero to seven. That
number of the least significant bits of the final byte, if any, are not part
of the contents and should be ignored. NOTE: Must be called AFTER the stream
has been fully processed. (Does not need to be called if
ASN1BitStringParser.getOctetStream()
was used instead of ASN1BitStringParser.getBitStream()
).getPadBits
in interface ASN1BitStringParser
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class ASN1Primitive
public ASN1Primitive getLoadedObject()
InMemoryRepresentable
getLoadedObject
in interface InMemoryRepresentable