Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DLBitStringParser

extends Object
implements ASN1BitStringParser
Class Inheritance
All Implemented Interfaces
org.bouncycastle.asn1.ASN1BitStringParser, org.bouncycastle.asn1.InMemoryRepresentable, org.bouncycastle.asn1.ASN1Encodable
Imports
java.io.IOException, .InputStream

Deprecated

Check for 'ASN1BitStringParser' instead

Parser for a DL encoded BIT STRING.

Field Summary

Modifier and TypeField and Description
private int
private final DefiniteLengthInputStream

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public InputStream
getBitStream()

Implements org.bouncycastle.asn1.ASN1BitStringParser.getBitStream.

Return an InputStream representing the contents of the BIT STRING.

private InputStream
getBitStream(boolean octetAligned)

public ASN1Primitive
getLoadedObject()

Implements org.bouncycastle.asn1.InMemoryRepresentable.getLoadedObject.

Get the in-memory representation of the ASN.1 object.

public InputStream
getOctetStream()

Implements org.bouncycastle.asn1.ASN1BitStringParser.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).

public int
getPadBits()

Implements org.bouncycastle.asn1.ASN1BitStringParser.getPadBits.

Return the number of pad bits, if any, in the final byte, if any, read from getBitStream().

public ASN1Primitive
toASN1Primitive()

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an object, possibly constructed, of ASN.1 primitives

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

padBitsback to summary
private int padBits
streamback to summary
private final DefiniteLengthInputStream stream

Constructor Detail

DLBitStringParserback to summary
pack-priv DLBitStringParser(DefiniteLengthInputStream stream)

Method Detail

getBitStreamback to summary
public InputStream getBitStream() throws IOException

Implements org.bouncycastle.asn1.ASN1BitStringParser.getBitStream.

Doc from org.bouncycastle.asn1.ASN1BitStringParser.getBitStream.

Return an InputStream representing the contents of the BIT STRING. The final byte, if any, may include pad bits. See getPadBits().

Returns:InputStream

an InputStream with its source as the BIT STRING content.

getBitStreamback to summary
private InputStream getBitStream(boolean octetAligned) throws IOException
getLoadedObjectback to summary
public ASN1Primitive getLoadedObject() throws IOException

Implements org.bouncycastle.asn1.InMemoryRepresentable.getLoadedObject.

Doc from org.bouncycastle.asn1.InMemoryRepresentable.getLoadedObject.

Get the in-memory representation of the ASN.1 object.

Returns:ASN1Primitive

an ASN1Primitive representing the loaded object.

Exceptions
IOException:
for bad input data.
getOctetStreamback to summary
public InputStream getOctetStream() throws IOException

Implements org.bouncycastle.asn1.ASN1BitStringParser.getOctetStream.

Doc from org.bouncycastle.asn1.ASN1BitStringParser.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).

Returns:InputStream

an InputStream with its source as the BIT STRING content.

getPadBitsback to summary
public int getPadBits()

Implements org.bouncycastle.asn1.ASN1BitStringParser.getPadBits.

Doc from org.bouncycastle.asn1.ASN1BitStringParser.getPadBits.

Return the number of pad bits, if any, in the final byte, if any, read from 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 getOctetStream() was used instead of getBitStream()).

Returns:int

the number of pad bits. In the range zero to seven.

toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Doc from org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Return an object, possibly constructed, of ASN.1 primitives

Returns:ASN1Primitive

an ASN.1 primitive.