Here you can find the source of invertArray(final byte[] array)
public static byte[] invertArray(final byte[] array)
//package com.java2s; //License from project: Open Source License public class Main { public static byte[] invertArray(final byte[] array) { byte[] temp = array.clone(); for (int i = 0; i < array.length; i++) array[i] = temp[array.length - i - 1]; return array; }//from www. j a v a 2 s .c om }