Class Chars


  • @ParametersAreNonnullByDefault
    public final class Chars
    extends Object
    Static utility methods related to char and Character.
    • Method Detail

      • toBytes

        @Nonnull
        public static byte[] toBytes​(char value)
        Encodes a char to a byte array.
        Parameters:
        value - the value to encode
        Returns:
        a byte array
        Throws:
        NullPointerException - if the value is null
        See Also:
        Shorts.toBytes(short)
      • toBytes

        @Nonnull
        public static byte[] toBytes​(Character value)
        Encodes a Character to a byte array.
        Parameters:
        value - the value to encode
        Returns:
        a byte array
        Throws:
        NullPointerException - if the value is null