Java Array Invert invert(byte[] key)

Here you can find the source of invert(byte[] key)

Description

invert

License

Apache License

Declaration

public static byte[] invert(byte[] key) 

Method Source Code

//package com.java2s;
//   Licensed under the Apache License, Version 2.0 (the "License");

import java.util.Arrays;

public class Main {
    public static byte[] invert(byte[] key) {
        byte[] inverted = Arrays.copyOf(key, key.length);
        for (int i = 0; i < inverted.length; i++) {
            inverted[i] = (byte) (inverted[i] & 0xFF);
        }//from w w w .  j  a va 2 s  .c  o  m
        return inverted;
    }
}

Related

  1. invert(boolean[] binary)
  2. invert(boolean[] result)
  3. invert(byte abyte0[])
  4. invert(byte[] array)
  5. invert(byte[] bytes)
  6. invert(byte[] v)
  7. invert(double[] ary)
  8. invert(float[] a)
  9. invert(float[] m, float[] invOut)