Package org.atlanmod.commons.primitive
Class Ints
- java.lang.Object
-
- org.atlanmod.commons.primitive.Ints
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]toBytes(int value)Encodes anintto abytearray.static byte[]toBytes(Integer value)Encodes anIntegerto abytearray.
-
-
-
Method Detail
-
toBytes
@Nonnull public static byte[] toBytes(int value)
Encodes anintto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray
-
toBytes
@Nonnull public static byte[] toBytes(Integer value)
Encodes anIntegerto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - Throws:
NullPointerException- if thevalueisnull
-
-