Package org.atlanmod.commons.primitive
Class Chars
- java.lang.Object
-
- org.atlanmod.commons.primitive.Chars
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]toBytes(char value)Encodes acharto abytearray.static byte[]toBytes(Character value)Encodes aCharacterto abytearray.
-
-
-
Method Detail
-
toBytes
@Nonnull public static byte[] toBytes(char value)
Encodes acharto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - Throws:
NullPointerException- if thevalueisnull- See Also:
Shorts.toBytes(short)
-
toBytes
@Nonnull public static byte[] toBytes(Character value)
Encodes aCharacterto abytearray.- Parameters:
value- the value to encode- Returns:
- a
bytearray - Throws:
NullPointerException- if thevalueisnull
-
-