Class DerInputBuffer

java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
org.mozilla.jss.netscape.security.util.DerInputBuffer
All Implemented Interfaces:
Closeable, AutoCloseable, Cloneable

class DerInputBuffer extends ByteArrayInputStream implements Cloneable
DER input buffer ... this is the main abstraction in the DER library which actively works with the "untyped byte stream" abstraction. It does so with impunity, since it's not intended to be exposed to the anyone who could violate the "typed value stream" DER model and hence corrupt the input stream of DER values.
Version:
1.11
  • Constructor Details

    • DerInputBuffer

      DerInputBuffer(byte[] buf)
    • DerInputBuffer

      DerInputBuffer(byte[] buf, int offset, int len)
  • Method Details

    • dup

    • toByteArray

      byte[] toByteArray() throws IOException
      Throws:
      IOException
    • peek

      int peek() throws IOException
      Throws:
      IOException
    • equals

      public boolean equals(Object other)
      Compares this DerInputBuffer for equality with the specified object.
      Overrides:
      equals in class Object
    • equals

      boolean equals(DerInputBuffer other)
    • truncate

      void truncate(int len) throws IOException
      Throws:
      IOException
    • getUnsigned

      BigInt getUnsigned(int len) throws IOException
      Returns the unsigned integer which takes up the specified number of bytes in this buffer.
      Throws:
      IOException
    • getBitString

      byte[] getBitString()
      Returns the bit string which takes up the rest of this buffer. This bit string must be byte-aligned.
    • getUnalignedBitString

      BitArray getUnalignedBitString()
      Returns the bit string which takes up the rest of this buffer. The bit string need not be byte-aligned.
    • dump

      void dump(OutputStream out, int length) throws IOException
      Package-access method to optimize output operations
      Throws:
      IOException