List of utility methods to do Endian Flip
byte[] | flipEndian(byte[] data) Reverse the endian-ness of a byte array. if (data == null) { return new byte[0]; byte[] newData = new byte[data.length]; for (int i = 0; i < data.length; i++) { newData[data.length - i - 1] = data[i]; return newData; ... |
byte[] | flipEndian(byte[] input, int offset, int len, int bits, int scanLineStride, boolean bigEndian) Flip the endian of the input byte-compacted array long value = 0; int bits_remain = 0; long temp_byte = 0; int empty_bits = 8; byte[] output = new byte[input.length]; int strideCounter = 0; int end = offset + len; int bufIndex = 0; ... |
void | flipEndian(byte[] original, byte[] output) Reverse the order of a byte array and write that reordered array to the given output. for (int i = 0; i < original.length; i++) { output[(original.length - 1) - i] = original[i]; |