Package alpine.util

Class ByteUtil


  • public final class ByteUtil
    extends Object
    A collection of functions that operate on bytes.
    Since:
    1.0.0
    Author:
    Steve Springett
    • Method Detail

      • toBytes

        public static byte[] toBytes​(char[] chars)
        Converts a char array to a byte array without the use of Strings. http://stackoverflow.com/questions/5513144/converting-char-to-byte
        Parameters:
        chars - the characters to convert
        Returns:
        a byte array of the converted characters
        Since:
        1.0.0