Class DLBitStringParser

  • All Implemented Interfaces:
    io.anyline.nfc.bouncycastle.asn1.ASN1BitStringParser , io.anyline.nfc.bouncycastle.asn1.ASN1Encodable , io.anyline.nfc.bouncycastle.asn1.InMemoryRepresentable

    
    public class DLBitStringParser
     implements ASN1BitStringParser
                        

    Parser for a DL encoded BIT STRING.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public int padBits
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getPadBits() Return the number of pad bits, if any, in the final byte, if any, read from getBitStream.
      InputStream getBitStream() Return an InputStream representing the contents of the BIT STRING.
      InputStream 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).
      ASN1Primitive getLoadedObject() Get the in-memory representation of the ASN.1 object.
      ASN1Primitive toASN1Primitive() Return an object, possibly constructed, of ASN.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getPadBits

         int 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:

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

      • getBitStream

         InputStream getBitStream()

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

        Returns:

        an InputStream with its source as the BIT STRING content.

      • getOctetStream

         InputStream 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:

        an InputStream with its source as the BIT STRING content.

      • getLoadedObject

         ASN1Primitive getLoadedObject()

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

        Returns:

        an ASN1Primitive representing the loaded object.