Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.asn1
Interface ASN1BitStringParser

All Superinterfaces:
  ASN1Encodable, InMemoryRepresentable

All Known Implementing Classes:
  ASN1BitString, BERBitStringParser, DLBitStringParser

public interface ASN1BitStringParser
extends ASN1Encodable, InMemoryRepresentable

A basic parser for a BIT STRING object

Method Summary
`java.io.InputStream` | `getBitStream()` Return an InputStream representing the contents of the BIT STRING.
`java.io.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).
`int` | `getPadBits()` Return the number of pad bits, if any, in the final byte, if any, read from `getBitStream()`.

Methods inherited from interface org.bouncycastle.asn1.ASN1Encodable
`toASN1Primitive`

Methods inherited from interface org.bouncycastle.asn1.InMemoryRepresentable
`getLoadedObject`

Method Detail

### getBitStream

    public java.io.InputStream getBitStream()
                                     throws java.io.IOException

  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.
  Throws:
    `java.io.IOException`

### getOctetStream

    public java.io.InputStream getOctetStream()
                                       throws java.io.IOException

  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.
  Throws:
    `java.io.IOException`

### getPadBits

    public 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.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography Library 1.84
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD