List of usage examples for org.apache.commons.io EndianUtils swapInteger
public static int swapInteger(int value)
From source file:com.github.bmadecoder.Authenticator.java
private static int selectInt(byte input[]) { int i = selectPos(input); byte[] subarray = ArrayUtils.subarray(input, i, i + 4); subarray[0] = (byte) (subarray[0] & 0x7f); int readSwappedInteger = EndianUtils.readSwappedInteger(subarray, 0); int result = EndianUtils.swapInteger(readSwappedInteger); return result; }