In the ASN.1 standard, it is possible to define an enumerated bit string that specifies named constants for different bit positions. ASN1C provides support for this type of construct by generating symbolic constants that can be used to set, clear, or test these named bits. These symbolic constants are simply the bit names and values in the following general form:
public final static int <name> = <value>;
The base class contains the following methods for using these generated constants:
set
: This method can be used to set a bit in
the bit string to be set. There is also an overloaded version
that takes a boolean value argument that can be used to set
the bit to the given boolean value.
clear
: This method can be used to clear the
named bit in the bit string.
isSet
: This method can be used to test if the
named bit is set or clear.
See the Asn1BitString class description in the run-time section for more details on these methods.