Class ASN1BitString

java.lang.Object
com.hierynomus.asn1.types.ASN1Object<boolean[]>
com.hierynomus.asn1.types.string.ASN1String<boolean[]>
com.hierynomus.asn1.types.string.ASN1BitString
All Implemented Interfaces:
ASN1Constructed, ASN1Primitive, Iterable<ASN1Object>

public class ASN1BitString extends ASN1String<boolean[]>
  • Field Details

    • unusedBits

      private int unusedBits
    • bits

      private boolean[] bits
  • Constructor Details

    • ASN1BitString

      private ASN1BitString(ASN1Tag<ASN1BitString> tag, byte[] bytes, int unusedBits)
    • ASN1BitString

      public ASN1BitString(byte[] bytes, int unusedBits)
    • ASN1BitString

      public ASN1BitString(boolean[] bits)
    • ASN1BitString

      public ASN1BitString(BitSet bitSet)
      Constructor for ASN.1 BIT STRING. The passed in BitSet will be treated as having no unused bits.
      Parameters:
      bitSet -
  • Method Details

    • constructBytes

      private static byte[] constructBytes(boolean[] bits)
    • constructBytes

      private static byte[] constructBytes(BitSet bitSet)
    • constructBits

      private boolean[] constructBits()
    • getValue

      public boolean[] getValue()
      Specified by:
      getValue in class ASN1Object<boolean[]>
    • valueString

      protected String valueString()
      Overrides:
      valueString in class ASN1Object<boolean[]>
    • isSet

      public boolean isSet(int x)
      Check whether bit 'x' is set in the ASN.1 BIT_STRING
      Parameters:
      x - The bit to check
      Returns:
      true if bit 'x' is set, false otherwise.
    • length

      public int length()
      Specified by:
      length in class ASN1String<boolean[]>