Class ByteOrderParser


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.nio.ByteOrder parseByteOrder​(java.lang.String value)
      Parses the String argument as a ByteOrder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • parseByteOrder

        public static java.nio.ByteOrder parseByteOrder​(java.lang.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:
        java.lang.IllegalArgumentException - if the String containing the ByteOrder representation to be parsed is unknown.