Package org.apache.kerby.xdr.type
Class XdrUnsignedInteger
- All Implemented Interfaces:
XdrType
Xdr Unsigned Integer type from RFC 4506
An XDR unsigned integer is a 32-bit datum that encodes
a non-negative integer in the range [0,4294967295].
It is represented by an unsigned binary number whose most
and least significant bytes are 0 and 3, respectively.
An unsigned integer is declared as follows:
unsigned int identifier;
(MSB) (LSB)
+-------+-------+-------+-------+
|byte 0 |byte 1 |byte 2 |byte 3 |
+-------+-------+-------+-------+
|------------32 bits------------|
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.kerby.xdr.type.XdrSimple
decode, decodeBody, encodeBody, encodeBody, getBytes, isSimple, setBytesMethods inherited from class org.apache.kerby.xdr.type.AbstractXdrType
decode, encode, encode, encodingLength, getDataType, getValue, setValue
-
Constructor Details
-
XdrUnsignedInteger
public XdrUnsignedInteger() -
XdrUnsignedInteger
-
XdrUnsignedInteger
-
-
Method Details
-
encodingBodyLength
protected int encodingBodyLength()The length of an unsigned integer is 4.- Overrides:
encodingBodyLengthin classXdrSimple<Long>- Returns:
- Length of a unsigned integer type.
-
toBytes
Encode Unsigned Integer type to bytes.- Specified by:
toBytesin classXdrSimple<Long>- Throws:
IOException- e
-
toValue
protected void toValue()Decode bytes to Unsigned Integer value.
-