code: public static void changeByteEndianess(byte[] b, int offset,
              int length) {
          byte tmp;
  
          for (int i = offset; i < offset + length; i += 2) {
              tmp = b[i];
              b[i] = b[i + 1];
              b[i + 1] = tmp;
          }
      }
docs: Invert two bytes in the given byte array starting at the given
  offset and repeating the inversion length/2 times.
  eg: b0b1 -> b1b0
  
  @param b the byte array
  @param offset the offset at which to change word start
  @param length the number of bytes on which to operate
  (should be a multiple of 2)