Here you can find the source of swap(final byte[] src)
public static byte[] swap(final byte[] src)
//package com.java2s; /*/*from www . j a v a 2s. co m*/ * Copyright (c) 2016 PrivatBank IT <acsk@privatbank.ua>. All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ public class Main { public static byte[] swap(final byte[] src) { final byte[] dst = new byte[src.length]; for (int i = 0; i < src.length; i++) { dst[dst.length - i - 1] = src[i]; } return dst; } }