@Test public void success_reverse() { byte[] input = new byte[]{26, 94, 11, 65, 43, 13, 62, 53, 13, 43}; assertThat(ByteUtils.reverse(input), is(new byte[]{43, 13, 53, 62, 13, 43, 65, 11, 94, 26})); byte[] input2 = new byte[]{54, 25, 53, 91, 24, 42, 51, 51, 54, 41, 35, 30, 45, 14, 34, 53}; assertThat(ByteUtils.reverse(input2), is(new byte[]{53, 34, 14, 45, 30, 35, 41, 54, 51, 51, 42, 24, 91, 53, 25, 54})); }
public static byte[] reverse(byte[] input) { byte[] output = new byte[input.length]; int counter = 0; for (byte b : input) { output[input.length - counter - 1] = b; counter++; } return output; }
ByteUtils { public static byte[] reverse(byte[] input) { byte[] output = new byte[input.length]; int counter = 0; for (byte b : input) { output[input.length - counter - 1] = b; counter++; } return output; } }
ByteUtils { public static byte[] reverse(byte[] input) { byte[] output = new byte[input.length]; int counter = 0; for (byte b : input) { output[input.length - counter - 1] = b; counter++; } return output; }  }
ByteUtils { public static byte[] reverse(byte[] input) { byte[] output = new byte[input.length]; int counter = 0; for (byte b : input) { output[input.length - counter - 1] = b; counter++; } return output; }  static byte[][] split(byte[] input, int firstLength); static byte[] reverse(byte[] input); static byte[] join(byte[] value1, byte[] value2); static byte[] join(byte[]... inputs); static byte[] paddingZeroOnHead(byte[] input, int byteLength); static byte[] paddingZeroOnTail(byte[] input, int byteLength); static int readBit(byte value, int position); }
ByteUtils { public static byte[] reverse(byte[] input) { byte[] output = new byte[input.length]; int counter = 0; for (byte b : input) { output[input.length - counter - 1] = b; counter++; } return output; }  static byte[][] split(byte[] input, int firstLength); static byte[] reverse(byte[] input); static byte[] join(byte[] value1, byte[] value2); static byte[] join(byte[]... inputs); static byte[] paddingZeroOnHead(byte[] input, int byteLength); static byte[] paddingZeroOnTail(byte[] input, int byteLength); static int readBit(byte value, int position);  }