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) |
int |
getBytesLength() |
static ASN1BitString |
getInstance(ASN1TaggedObject taggedObject,
boolean declaredExplicit) |
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
|
static ASN1BitString |
getTagged(ASN1TaggedObject taggedObject,
boolean declaredExplicit) |
int |
hashCode() |
int |
intValue() |
boolean |
isOctetAligned() |
ASN1BitStringParser |
parser() |
java.lang.String |
toString() |
encodeTo, encodeTo, equals, equals, equals, fromByteArray, toASN1PrimitivegetEncoded, getEncoded, hasEncodedTagValueclone, finalize, getClass, notify, notifyAll, wait, wait, waittoASN1Primitivepublic static ASN1BitString getInstance(java.lang.Object obj)
public static ASN1BitString getInstance(ASN1TaggedObject taggedObject, boolean declaredExplicit)
public static ASN1BitString getTagged(ASN1TaggedObject taggedObject, boolean declaredExplicit)
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
ASN1BitStringParserASN1BitStringParser.getPadBits().getBitStream in interface ASN1BitStringParserjava.io.IOExceptionpublic java.io.InputStream getOctetStream()
throws java.io.IOException
ASN1BitStringParsergetOctetStream in interface ASN1BitStringParserjava.io.IOExceptionpublic ASN1BitStringParser parser()
public java.lang.String getString()
getString in interface ASN1Stringpublic int intValue()
public byte[] getOctets()
public byte[] getBytes()
public int getBytesLength()
public boolean isOctetAligned()
public int getPadBits()
ASN1BitStringParserASN1BitStringParser.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 ASN1BitStringParserpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class ASN1Primitivepublic ASN1Primitive getLoadedObject()
InMemoryRepresentablegetLoadedObject in interface InMemoryRepresentable