Package org.apache.commons.io
Class ByteOrderParser
- java.lang.Object
-
- org.apache.commons.io.ByteOrderParser
-
public final class ByteOrderParser extends java.lang.Object
Converts Strings toByteOrder
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 aByteOrder
.
-
-
-
Method Detail
-
parseByteOrder
public static java.nio.ByteOrder parseByteOrder(java.lang.String value)
Parses the String argument as aByteOrder
.Returns
ByteOrder.LITTLE_ENDIAN
if the given value is"LITTLE_ENDIAN"
.Returns
Examples:ByteOrder.BIG_ENDIAN
if the given value is"BIG_ENDIAN"
.ByteOrderParser.parseByteOrder("LITTLE_ENDIAN")
returnsByteOrder.LITTLE_ENDIAN
ByteOrderParser.parseByteOrder("BIG_ENDIAN")
returnsByteOrder.BIG_ENDIAN
- Parameters:
value
- theString
containing the ByteOrder representation to be parsed- Returns:
- the ByteOrder represented by the string argument
- Throws:
java.lang.IllegalArgumentException
- if theString
containing the ByteOrder representation to be parsed is unknown.
-
-