public interface Asn1PerEncoder
| Modifier and Type | Method and Description |
|---|---|
void |
encodeBit(boolean value)
This method encodes a single bit value.
|
void |
encodeBit(boolean value,
java.lang.String ident)
This method encodes a single bit value.
|
void |
encodeBits(byte[] value,
int offset,
int nbits)
This method encodes bit values from an array of octets.
|
void |
encodeBits(byte[] value,
int offset,
int nbits,
java.lang.String ident)
This method encodes bit values from an array of octets.
|
void |
encodeBits(byte value,
int nbits)
This method encodes bit values from an octet.
|
void |
encodeCharString(java.lang.String value,
int nchars,
int offset,
int abpc,
int ubpc,
Asn1CharSet charSet)
This method encodes the contents of a known-multiplier character
string type.
|
void |
encodeConsWholeNumber(long adjustedValue,
long rangeValue)
This method implements the rules to encode a constrained whole
number as specified in section 10.5 of the X.691 standard.
|
void |
encodeConsWholeNumber(long adjustedValue,
long rangeValue,
java.lang.String ident)
This method implements the rules to encode a constrained whole
number as specified in section 10.5 of the X.691 standard.
|
void |
encodeInt(long value,
boolean encodeLen,
boolean signExtend)
This method implements the rules to encode either a
non-negative binary integer as specified in section 10.3 or
a two's complement binary integer as specified in section 10.4
of the X.691 standard.
|
void |
encodeInt(long value,
boolean encodeLen,
boolean signExtend,
java.lang.String ident)
This method implements the rules to encode either a
non-negative binary integer as specified in section 10.3 or
a two's complement binary integer as specified in section 10.4
of the X.691 standard.
|
void |
encodeInt(long value,
int nbits)
This method encodes bit values from an integer value.
|
void |
encodeInt(long value,
int nbits,
java.lang.String ident)
This method encodes bit values from an integer value.
|
long |
encodeLength(long value)
This method encodes a general (unconstrained) length
determinant value as described in section 10.9 or the
X.691 standard.
|
void |
encodeLength(long value,
long lower,
long upper)
This method encodes a constrained length determinant value.
|
void |
encodeLengthEOM(long value)
This method checks to see if a zero byte needs to be added
after a fragmented length has been encoded.
|
void |
encodeOctetString(byte[] value,
int offset,
int nbytes)
This method encodes the given array of bytes as an unconstrained
octet string value.
|
void |
encodeOIDLengthAndValue(int[] value)
This method encodes the length and contents of an object
identifier value.
|
void |
encodeOpenType(byte[] value,
int offset,
int nbytes)
This method encodes the given array of bytes as an open type.
|
void |
encodeRelOIDLengthAndValue(int[] value)
This method encodes the length and contents of a relative
object identifier value.
|
void |
encodeSmallLength(int value)
This method implements the rules to encode a normally small length
as specified in section 11.9 of the X.691 standard.
|
void |
encodeSmallNonNegWholeNumber(int value)
This method implements the rules to encode a small non-negative
whole number as specified in section 10.6 of the X.691 standard.
|
void encodeBit(boolean value)
throws java.io.IOException,
Asn1Exception
value - Boolean value of bit to be encoded.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeBit(boolean value,
java.lang.String ident)
throws java.io.IOException,
Asn1Exception
value - Boolean value of bit to be encoded.ident - Bit field identifier name for tracing.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeBits(byte value,
int nbits)
throws java.io.IOException,
Asn1InvalidArgException
value - Octet containing bits to be encodednbits - Number of bits to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeBits(byte[] value,
int offset,
int nbits)
throws java.io.IOException,
Asn1InvalidArgException
value - Octet array containing bits to be encodedoffset - Starting byte offset in valuenbits - Number of bits to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeBits(byte[] value,
int offset,
int nbits,
java.lang.String ident)
throws java.io.IOException,
Asn1InvalidArgException
value - Octet array containing bits to be encodedoffset - Starting byte offset in valuenbits - Number of bits to encodeident - Bit field identifier name for tracing.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeCharString(java.lang.String value,
int nchars,
int offset,
int abpc,
int ubpc,
Asn1CharSet charSet)
throws java.io.IOException,
Asn1Exception
value - String containing characters to encodenchars - Number of characters from string to encodeoffset - Offset to first char in string to encodeabpc - Number of bits per character (aligned)ubpc - Number of bits per character (unaligned)charSet - Object representing permitted alphabet
constraint character set (optional)java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeConsWholeNumber(long adjustedValue,
long rangeValue,
java.lang.String ident)
throws java.io.IOException,
Asn1InvalidArgException
adjustedValue - Adjusted value to be encoded =
value - lower range endpoint valuerangeValue - lower - upper + 1ident - Bit field identifier name for tracing.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeConsWholeNumber(long adjustedValue,
long rangeValue)
throws java.io.IOException,
Asn1InvalidArgException
adjustedValue - Adjusted value to be encoded =
value - lower range endpoint valuerangeValue - upper - lower + 1. Negative values are
interpreted as unsigned integers. Zero is
used to represent 2^64.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeInt(long value,
int nbits,
java.lang.String ident)
throws java.io.IOException,
Asn1InvalidArgException
value - Integer containing bits to be encodednbits - Number of bits to encodeident - Bit field identifier name for tracing.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeInt(long value,
int nbits)
throws java.io.IOException,
Asn1InvalidArgException
value - Integer containing bits to be encodednbits - Number of bits to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeInt(long value,
boolean encodeLen,
boolean signExtend,
java.lang.String ident)
throws java.io.IOException,
Asn1InvalidArgException
value - Integer value to be encodedencodeLen - Flag indicating length determinant should be
encoded before encoding integer value.signExtend - Flag indicating if sign extension should be performed.ident - Bit field identifier name for tracing.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeInt(long value,
boolean encodeLen,
boolean signExtend)
throws java.io.IOException,
Asn1InvalidArgException
value - Integer value to be encodedencodeLen - Flag indicating length determinant should be
encoded before encoding integer value.signExtend - Flag indicating if sign extension should be performed.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.long encodeLength(long value)
throws java.io.IOException,
Asn1InvalidArgException
value - Length value to be encodedjava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeLength(long value,
long lower,
long upper)
throws java.io.IOException,
Asn1Exception
value - Length value to be encodedlower - Lower bound (inclusive) of length value rangeupper - Upper bound (inclusive) of length value rangejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeLengthEOM(long value)
throws java.io.IOException,
Asn1Exception
value - Original length value that was encoded.java.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeOctetString(byte[] value,
int offset,
int nbytes)
throws java.io.IOException,
Asn1Exception
value - Byte array containing data to encode. This is
assumed to contain a previously encoded PER
component.offset - Starting offset in byte array valuenbytes - Number of bytes to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeOIDLengthAndValue(int[] value)
throws java.io.IOException,
Asn1Exception
value - Integer array containing arcs to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeRelOIDLengthAndValue(int[] value)
throws java.io.IOException,
Asn1Exception
value - Integer array containing arcs to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeOpenType(byte[] value,
int offset,
int nbytes)
throws java.io.IOException,
Asn1Exception
value - Byte array containing data to encode. This is
assumed to contain a previously encoded PER
component.offset - Starting offset in byte array valuenbytes - Number of bytes to encodejava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1Exception - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeSmallLength(int value)
throws java.io.IOException,
Asn1InvalidArgException
value - Value to be encodedjava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.void encodeSmallNonNegWholeNumber(int value)
throws java.io.IOException,
Asn1InvalidArgException
value - Value to be encodedjava.io.IOException - Any exception thrown by the underlying OutputStream.Asn1InvalidArgException - Any exception thrown by the underlying
Asn1PerEncodeBuffer.