Package com.oss.asn1
Class HugeBitString
java.lang.Object
com.oss.asn1.AbstractData
com.oss.asn1.HugeBinaryString
com.oss.asn1.HugeBitString
- All Implemented Interfaces:
com.oss.asn1.Sizeable
,Serializable
,Cloneable
- Direct Known Subclasses:
HugeContainingBitString
The HugeBitString class represents a BIT STRING with the ValueInFile directive applied.
- Since:
- ASN.1/Java 1.4 beta A
- See Also:
-
Field Summary
Fields inherited from class com.oss.asn1.AbstractData
EQUALS, GREATER_THAN, LESS_THAN
-
Constructor Summary
ConstructorsConstructorDescriptionThe default constructor creates an empty bit stringHugeBitString
(ByteStorage value) Construct from a ByteStorage object.HugeBitString
(ByteStorage value, int sigBits) Construct from a ByteStorage object with the specified number of significant bits. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clone 'this' object.final boolean
equalTo
(HugeBitString that) Compare 'this' object to another HugeBitString object to see if their contents are the same.final int
getSize()
Get the number of significant bits of 'this' BitString object.final void
setValue
(ByteStorage value) Set the value of this object to a ByteStorage object.final void
setValue
(ByteStorage value, int sigBits) Set the value of this object to a ByteStorage object.Methods inherited from class com.oss.asn1.HugeBinaryString
byteStorageValue, delete
Methods inherited from class com.oss.asn1.AbstractData
equals, hashCode, isEncodable, isPDU, isValid, toString, toString
-
Constructor Details
-
HugeBitString
public HugeBitString()The default constructor creates an empty bit string -
HugeBitString
Construct from a ByteStorage object. The significant bits are set to the number of octets in the ByteStorage multiplied by 8.- Parameters:
value
- the ByteStorage to set this object to.
-
HugeBitString
Construct from a ByteStorage object with the specified number of significant bits.- Parameters:
value
- the ByteStorage to set this object to.sigBits
- the number of significant bits.
-
-
Method Details
-
setValue
Set the value of this object to a ByteStorage object. The significant bits are set to the number of octets in the ByteStorage multiplied by 8.- Overrides:
setValue
in classHugeBinaryString
- Parameters:
value
- the ByteStorage to set this object to.
-
setValue
Set the value of this object to a ByteStorage object.- Parameters:
value
- the value to set this object to.sigBits
- the number of significant bits.
-
getSize
public final int getSize()Get the number of significant bits of 'this' BitString object.- Specified by:
getSize
in interfacecom.oss.asn1.Sizeable
- Returns:
- integer value indicating the number of significant bits.
-
equalTo
Compare 'this' object to another HugeBitString object to see if their contents are the same. If the ASN.1 definition of the BIT STRING has named bits then the comparison ignores trailing zero bits in the BIT STRING value.- Parameters:
that
- the HugeBitString object to compare 'this' object to.- Returns:
- true if contents of both objects are the same.
-
clone
Clone 'this' object.- Overrides:
clone
in classHugeBinaryString
- Returns:
- deep copy of 'this' object.
-