private fun concatBytes(array1: ByteArray, array2: ByteArray): ByteArray? { val cBytes = ByteArray(array1.size + array2.size) try { System.arraycopy(array1, 0, cBytes, 0, array1.size) System.arraycopy(array2, 0, cBytes, array1.size, array2.size) } catch (e: Exception) { throw FacesException(e)}return cBytes }
This method concatenates two byte arrays