Top Description Fields Constructors Methods
org.bouncycastle.asn1

public Class DLBitString

extends ASN1BitString
Class Inheritance
Imports
java.io.IOException

A Definite length BIT STRING

Field Summary

Inherited from org.bouncycastle.asn1.ASN1BitString:
datapadBits

Constructor Summary

AccessConstructor and Description
protected
DLBitString(byte data, int padBits)

public
DLBitString(byte[]
the octets making up the bit string.
data
,
int
the number of extra bits at the end of the string.
padBits
)

public
DLBitString(byte[] data)

public
DLBitString(int value)

public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv int
encodedLength()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Return the length of the encoding this object will produce.
pack-priv static DLBitString
fromOctetString(byte[] bytes)

public static ASN1BitString

Returns:

an ASN1BitString instance, or null.
getInstance
(Object
a DL or DER BitString or an object that can be converted into one.
obj
)

return a Bit String that can be definite-length encoded from the passed in object.

public static ASN1BitString

Returns:

an ASN1BitString instance, or null.
getInstance
(ASN1TaggedObject
the tagged object holding the object we want
obj
,
boolean
true if the object is meant to be explicitly tagged false otherwise.
explicit
)

return a Bit String from a tagged object.

pack-priv boolean
isConstructed()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Return true if this objected is a CONSTRUCTED one, false otherwise.
private static byte[]
toByteArray(byte data)

Inherited from org.bouncycastle.asn1.ASN1BitString:
asn1EqualsderFormfromInputStreamgetBytesgetBytesgetLoadedObjectgetOctetsgetPadBitsgetPadBitsgetStringhashCodeintValuetoDERObjecttoDLObjecttoString

Constructor Detail

DLBitStringback to summary
protected DLBitString(byte data, int padBits)
DLBitStringback to summary
public DLBitString(byte[] data, int padBits)
Parameters
data:byte[]

the octets making up the bit string.

padBits:int

the number of extra bits at the end of the string.

DLBitStringback to summary
public DLBitString(byte[] data)
DLBitStringback to summary
public DLBitString(int value)
DLBitStringback to summary
public DLBitString(ASN1Encodable obj) throws IOException

Method Detail

encodeback to summary
pack-priv void encode(ASN1OutputStream out) throws IOException

Implements abstract org.bouncycastle.asn1.ASN1BitString.encode.

encodedLengthback to summary
pack-priv int encodedLength()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Doc from org.bouncycastle.asn1.ASN1Primitive.encodedLength.

Return the length of the encoding this object will produce.

Returns:int

the length of the object's encoding.

fromOctetStringback to summary
pack-priv static DLBitString fromOctetString(byte[] bytes)
getInstanceback to summary
public static ASN1BitString getInstance(Object obj)

return a Bit String that can be definite-length encoded from the passed in object.

Parameters
obj:Object

a DL or DER BitString or an object that can be converted into one.

Returns:ASN1BitString

an ASN1BitString instance, or null.

Exceptions
IllegalArgumentException:
if the object cannot be converted.
getInstanceback to summary
public static ASN1BitString getInstance(ASN1TaggedObject obj, boolean explicit)

return a Bit String from a tagged object.

Parameters
obj:ASN1TaggedObject

the tagged object holding the object we want

explicit:boolean

true if the object is meant to be explicitly tagged false otherwise.

Returns:ASN1BitString

an ASN1BitString instance, or null.

Exceptions
IllegalArgumentException:
if the tagged object cannot be converted.
isConstructedback to summary
pack-priv boolean isConstructed()

Implements abstract org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Doc from org.bouncycastle.asn1.ASN1Primitive.isConstructed.

Return true if this objected is a CONSTRUCTED one, false otherwise.

Returns:boolean

true if CONSTRUCTED bit set on object's tag, false otherwise.

toByteArrayback to summary
private static byte[] toByteArray(byte data)