GSF.ASN1
BER OID Encoding
Implemented by Alan Gutzeit.
Adds encoding to passed result array. Note that result array must already have adequate capacity.
length of result
Decode the constraint length determinant.
ITU-T X.691. 10.9. General rules for encoding a length determinant
Decode the length determinant
ITU-T X.691. 10.9. General rules for encoding a length determinant
Decode of the constrained whole number
ITU-T X.691. 10.5.
NOTE – (Tutorial) This subclause is referenced by other clauses,
and itself references earlier clauses for the production of
a nonnegative-binary-integer or a 2's-complement-binary-integer encoding.
Decode the semi-constrained whole number
ITU-T X.691. 10.7.
NOTE – (Tutorial) This procedure is used when a lower bound can be
identified but not an upper bound. The encoding procedure places
the offset from the lower bound into the minimum number of octets
as a non-negative-binary-integer, and requires an explicit length
encoding (typically a single octet) as specified in later procedures.
Decode the normally small number
ITU-T X.691. 10.6
NOTE – (Tutorial) This procedure is used when encoding
a non-negative whole number that is expected to be small, but whose size
is potentially unlimited due to the presence of an extension marker.
An example is a choice index.
Decode the unconstrained whole number
ITU-T X.691. 10.8.
NOTE – (Tutorial) This case only arises in the encoding of the
value of an integer type with no lower bound. The procedure
encodes the value as a 2's-complement-binary-integer into
the minimum number of octets required to accommodate the encoding,
and requires an explicit length encoding (typically a single octet)
as specified in later procedures.
Encoding constraint length determinant procedure.
ITU-T X.691. 10.9. General rules for encoding a length determinant
Encoding length determinant procedure.
ITU-T X.691. 10.9. General rules for encoding a length determinant
Encoding of a constrained whole number
ITU-T X.691. 10.5.
NOTE – (Tutorial) This subclause is referenced by other clauses,
and itself references earlier clauses for the production of
a nonnegative-binary-integer or a 2's-complement-binary-integer encoding.
Encoding of a semi-constrained whole number
ITU-T X.691. 10.7.
NOTE – (Tutorial) This procedure is used when a lower bound can be
identified but not an upper bound. The encoding procedure places
the offset from the lower bound into the minimum number of octets
as a non-negative-binary-integer, and requires an explicit length
encoding (typically a single octet) as specified in later procedures.
Encode normally small number
ITU-T X.691. 10.6
NOTE – (Tutorial) This procedure is used when encoding
a non-negative whole number that is expected to be small, but whose size
is potentially unlimited due to the presence of an extension marker.
An example is a choice index.
Encoding of a unconstrained whole number
ITU-T X.691. 10.8.
NOTE – (Tutorial) This case only arises in the encoding of the
value of an integer type with no lower bound. The procedure
encodes the value as a 2's-complement-binary-integer into
the minimum number of octets required to accommodate the encoding,
and requires an explicit length encoding (typically a single octet)
as specified in later procedures.
Encoding of the choice structure
ITU-T X.691. 22.
NOTE – (Tutorial) A choice type is encoded by encoding an index specifying
the chosen alternative. This is encoded as for a constrained integer
(unless the extension marker is present in the choice type,
in which case it is a normally small non-negative whole number)
and would therefore typically occupy a fixed length bit-field of the
minimum number of bits needed to encode the index. (Although it could
in principle be arbitrarily large.) This is followed by the encoding
of the chosen alternative, with alternatives that are extension
additions encoded as if they were the value of an open type field.
Where the choice has only one alternative, there is no encoding
for the index.
Dummy class declaration for ASN.1 NULL type
This class implements an output stream in which the data is written
into a reverse byte array. The buffer automatically grows as data is
written to it. The data can be retrieved using toByteArray()
and toString()
. Closing a ByteArrayOutputStream
has no effect. The methods in this class can be called after the stream
has been closed without generating an IOException.