Class DERInputBuffer
java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
com.github.toolarium.security.pki.impl.rsa.der.DERInputBuffer
- All Implemented Interfaces:
Closeable,AutoCloseable,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
anyone who could violate the "typed value stream" DER model and hence
corrupt the input stream of DER values.
-
Field Summary
Fields inherited from class java.io.ByteArrayInputStream
buf, count, mark, pos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondup()Duplicatebooleanbyte[]Returns the bit string which takes up the rest of this buffer.Returns the bit string which takes up the rest of this buffer.getUnsigned(int l) Returns the unsigned integer which takes up the specified number of bytes in this buffer.inthashCode()Returns a hashcode for this DerInputBuffer.voidtruncate(int len) TruncateMethods inherited from class java.io.ByteArrayInputStream
available, close, mark, markSupported, read, read, readAllBytes, readNBytes, reset, skip, transferToMethods inherited from class java.io.InputStream
nullInputStream, read, readNBytes, skipNBytes
-
Constructor Details
-
DERInputBuffer
public DERInputBuffer(byte[] buf) Constructor for DerInputBuffer- Parameters:
buf- the buffer
-
-
Method Details
-
dup
Duplicate- Returns:
- the buffer
- Throws:
IllegalArgumentException- In case of invalid argument
-
equals
-
hashCode
public int hashCode()Returns a hashcode for this DerInputBuffer. -
truncate
Truncate- Parameters:
len- the length- Throws:
IOException- In case of missing data
-
getUnsigned
Returns the unsigned integer which takes up the specified number of bytes in this buffer.- Parameters:
l- the length- Returns:
- the integer
- Throws:
IOException- In case of missing data
-
getBitString
public byte[] getBitString()Returns the bit string which takes up the rest of this buffer. This bit string must be byte-aligned.- Returns:
- the byte array
-
getUnalignedBitString
Returns the bit string which takes up the rest of this buffer. The bit string need not be byte-aligned.- Returns:
- the bit array
-