Class Utils


  • public final class Utils
    extends Object
    Various static utility methods for use within in.datatypes.
    • Method Detail

      • getSemiOctetLeftToRight

        public static int getSemiOctetLeftToRight​(byte[] buf,
                                                  int pos)
        Gets a semi-octet from the given byte array.
        Parameters:
        buf - byte[]
        pos - which semi-octet to get, counting from 0, high semi-octet first
        Returns:
        semi-octet extracted from buf
      • getSemiOctet

        public static int getSemiOctet​(byte[] buf,
                                       int pos)
        Gets a semi-octet from the given byte array.
        Parameters:
        buf - byte[]
        pos - which semi-octet to get, counting from 0, low semi-octet first
        Returns:
        semi-octet extracted from buf
      • setSemiOctetLeftToRight

        public static void setSemiOctetLeftToRight​(byte[] buf,
                                                   int pos,
                                                   int value)
        Sets a semi-octet in the given byte array to the given value.
        Parameters:
        buf - byte[]
        pos - which semi-octet to set, counting from 0, high semi-octet first
        value - to set the semi-octet to
      • setSemiOctet

        public static void setSemiOctet​(byte[] buf,
                                        int pos,
                                        int value)
        Sets a semi-octet in the given byte array to the given value.
        Parameters:
        buf - byte[]
        pos - which semi-octet to set, counting from 0, low semi-octet first
        value - to set the semi-octet to