Package org.apache.kerby.xdr.type
Class XdrBoolean
- All Implemented Interfaces:
XdrType
Xdr Boolean type from RFC 4506
Boolean type has the same representation as signed integers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, generally for decoding as a containerXdrBoolean(Boolean value) Constructor with a value, generally for encoding of the value -
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
-
Field Details
-
TRUE
-
FALSE
-
-
Constructor Details
-
XdrBoolean
public XdrBoolean()Default constructor, generally for decoding as a container -
XdrBoolean
Constructor with a value, generally for encoding of the value- Parameters:
value- The boolean value
-
-
Method Details
-
encodingBodyLength
protected int encodingBodyLength()The length of a signed integer is 4.- Overrides:
encodingBodyLengthin classXdrSimple<Boolean>- Returns:
- Length of a boolean type.
-
toBytes
protected void toBytes()Encode boolean type to bytes. -
toValue
Decode bytes to boolean value.- Specified by:
toValuein classXdrSimple<Boolean>- Throws:
IOException- Wrong bytes for boolean.
-