Class UByte
- java.lang.Object
-
- java.lang.Number
-
- org.apache.tika.parser.microsoft.onenote.fsshttpb.unsigned.UNumber
-
- org.apache.tika.parser.microsoft.onenote.fsshttpb.unsigned.UByte
-
- All Implemented Interfaces:
Serializable,Comparable<UByte>
public final class UByte extends UNumber implements Comparable<UByte>
Theunsigned bytetype- Author:
- Lukas Eder, Ed Schaller, Jens Nerche
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static UByteMAXA constant holding the maximum value anunsigned bytecan have as UByte, 28-1.static shortMAX_VALUEA constant holding the maximum value anunsigned bytecan have, 28-1.static UByteMINA constant holding the minimum value anunsigned bytecan have as UByte, 0.static shortMIN_VALUEA constant holding the minimum value anunsigned bytecan have, 0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UByteadd(int val)UByteadd(UByte val)intcompareTo(UByte o)doubledoubleValue()booleanequals(Object obj)floatfloatValue()inthashCode()intintValue()longlongValue()UBytesubtract(int val)UBytesubtract(UByte val)BigIntegertoBigInteger()Get this number as aBigInteger.StringtoString()static UBytevalueOf(byte value)Get an instance of anunsigned byteby masking it with0xFFi.e.static UBytevalueOf(int value)Get an instance of anunsigned bytestatic UBytevalueOf(long value)Get an instance of anunsigned bytestatic UBytevalueOf(short value)Get an instance of anunsigned bytestatic UBytevalueOf(String value)Get an instance of anunsigned byte-
Methods inherited from class java.lang.Number
byteValue, shortValue
-
-
-
-
Field Detail
-
MIN_VALUE
public static final short MIN_VALUE
A constant holding the minimum value anunsigned bytecan have, 0.- See Also:
- Constant Field Values
-
MAX_VALUE
public static final short MAX_VALUE
A constant holding the maximum value anunsigned bytecan have, 28-1.- See Also:
- Constant Field Values
-
MIN
public static final UByte MIN
A constant holding the minimum value anunsigned bytecan have as UByte, 0.
-
MAX
public static final UByte MAX
A constant holding the maximum value anunsigned bytecan have as UByte, 28-1.
-
-
Method Detail
-
valueOf
public static UByte valueOf(String value) throws NumberFormatException
Get an instance of anunsigned byte- Throws:
NumberFormatException- Ifvaluedoes not contain a parsableunsigned byte.
-
valueOf
public static UByte valueOf(byte value)
Get an instance of anunsigned byteby masking it with0xFFi.e.(byte) -1becomes(ubyte) 255
-
valueOf
public static UByte valueOf(short value) throws NumberFormatException
Get an instance of anunsigned byte- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(int value) throws NumberFormatException
Get an instance of anunsigned byte- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned byte
-
valueOf
public static UByte valueOf(long value) throws NumberFormatException
Get an instance of anunsigned byte- Throws:
NumberFormatException- Ifvalueis not in the range of anunsigned byte
-
floatValue
public float floatValue()
- Specified by:
floatValuein classNumber
-
doubleValue
public double doubleValue()
- Specified by:
doubleValuein classNumber
-
compareTo
public int compareTo(UByte o)
- Specified by:
compareToin interfaceComparable<UByte>
-
toBigInteger
public BigInteger toBigInteger()
Description copied from class:UNumberGet this number as aBigInteger. This is a convenience method for callingnew BigInteger(toString())- Overrides:
toBigIntegerin classUNumber
-
add
public UByte add(UByte val) throws NumberFormatException
- Throws:
NumberFormatException
-
add
public UByte add(int val) throws NumberFormatException
- Throws:
NumberFormatException
-
subtract
public UByte subtract(int val)
-
-