Package com.tailf.proto
Class ConfEBig
Object
com.tailf.proto.ConfEObject
com.tailf.proto.ConfEBig
- All Implemented Interfaces:
Serializable
,Cloneable
Provides a Java representation of E integral types. E does not distinguish
between different integral types, however this class and its subclasses
ConfEByte
, ConfEChar
, ConfEInt
, and
ConfEShort
attempt to map the E types onto the various Java integral
types. Two additional classes, ConfEUInt
and ConfEUShort
are
provided for Corba compatibility. See the documentation for IC for more
information.- See Also:
-
Constructor Summary
ConstructorDescriptionConfEBig
(byte[] val) Create an E integer from the given value.ConfEBig
(ConfInputStream buf) Create an E integer from a stream containing an integer encoded in E external format.ConfEBig
(BigInteger val) -
Method Summary
Modifier and TypeMethodDescriptionbigValue()
Get this number as a BigInteger.void
encode
(ConfOutputStream buf) Convert this number to the equivalent E external representation.boolean
Determine if two numbers are equal.float
Get this number as a float.int
hashCode()
long
Get this number as a longtoString()
Get the string representation of this number.Methods inherited from class com.tailf.proto.ConfEObject
clone, decode
-
Constructor Details
-
ConfEBig
public ConfEBig(byte[] val) Create an E integer from the given value.- Parameters:
val
- - byte array representing the big value
-
ConfEBig
- Parameters:
val
-
-
ConfEBig
Create an E integer from a stream containing an integer encoded in E external format.- Parameters:
buf
- the stream containing the encoded value.- Throws:
ConfEDecodeException
- if the buffer does not contain a valid external representation of an E integer.
-
-
Method Details
-
bigValue
Get this number as a BigInteger.- Returns:
- the value of this number, as a BigInteger.
-
longValue
public long longValue()Get this number as a long- Returns:
- the value of this number, as a long.
-
floatValue
public float floatValue()Get this number as a float.- Returns:
- the value of this number, as a long.
-
toString
Get the string representation of this number.- Specified by:
toString
in classConfEObject
- Returns:
- the string representation of this number.
-
encode
Convert this number to the equivalent E external representation.- Specified by:
encode
in classConfEObject
- Parameters:
buf
- an output stream to which the encoded number should be written.
-
equals
Determine if two numbers are equal. Numbers are equal if they contain the same value.- Specified by:
equals
in classConfEObject
- Parameters:
o
- the number to compare to.- Returns:
- true if the numbers have the same value.
-
hashCode
public int hashCode()
-