Class ByteOrderParser


  • public final class ByteOrderParser
    extends Object
    Converts Strings to ByteOrder instances.
    Since:
    2.6
    • Method Detail

      • parseByteOrder

        public static ByteOrder parseByteOrder​(String value)
        Parses the String argument as a ByteOrder.

        Returns ByteOrder.LITTLE_ENDIAN if the given value is "LITTLE_ENDIAN".

        Returns ByteOrder.BIG_ENDIAN if the given value is "BIG_ENDIAN".

        Examples:
        • ByteOrderParser.parseByteOrder("LITTLE_ENDIAN") returns ByteOrder.LITTLE_ENDIAN
        • ByteOrderParser.parseByteOrder("BIG_ENDIAN") returns ByteOrder.BIG_ENDIAN
        Parameters:
        value - the String containing the ByteOrder representation to be parsed
        Returns:
        the ByteOrder represented by the string argument
        Throws:
        IllegalArgumentException - if the String containing the ByteOrder representation to be parsed is unknown.