[New] Added ByteHelper.invert()

This commit is contained in:
Robert von Burg 2017-08-28 13:50:53 +02:00
parent 76b2fd2eb2
commit 291480fb6e
1 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,10 @@ public class ByteHelper {
return b;
}
public static byte invert(byte x) {
return (byte) (x ^ 0xff);
}
/**
* Formats the given byte array to a binary string, separating each byte by a space
*