@@ -0,0 +1,1697 @@
+package net.tridentsdk.server.util;%0A%0Apublic class BitUtils %7B%0A%0A    private int countSetBits(long number, int bitCount)%7B%0A        int setBits = 0;%0A%0A        for (int i = 0; i %3C 8; i++) %7B%0A            setBits += (number & 1 %3C%3C i);%0A        %7D%0A%0A        return setBits;%0A    %7D%0A%0A    public int countSetBits(byte b)%7B%0A        return countSetBits(b, 8);%0A    %7D%0A%0A    public int countSetBits(short s)%7B%0A        return countSetBits(s, 16);%0A    %7D%0A%0A    public int countSetBits(int i)%7B%0A        return countSetBits(i, 32);%0A    %7D%0A%0A    public int countSetBits(long l)%7B%0A        return countSetBits(l, 64);%0A    %7D%0A%0A    public int countUnsetBits(byte b)%7B%0A        return 8 - countSetBits(b, 8);%0A    %7D%0A%0A    public int countUnsetBits(short s)%7B%0A        return 16 - countSetBits(s, 16);%0A    %7D%0A%0A    public int countUnsetBits(int i)%7B%0A        return 32 - countSetBits(i, 32);%0A    %7D%0A%0A    public int countUnsetBits(long l)%7B%0A        return 64 - countSetBits(l, 64);%0A    %7D%0A%0A    public byte flip(byte b)%7B%0A        return (byte) ~b;%0A    %7D%0A%0A    public short flip(short s)%7B%0A        return (short) ~s;%0A    %7D%0A%0A    public int flip(int i)%7B%0A        return ~i;%0A    %7D%0A%0A    public long flip(long l)%7B%0A        return ~l;%0A    %7D%0A%0A    public byte setBit(byte b, int bit, boolean state)%7B%0A        return (byte) (state ? (b %7C 1 %3C%3C bit) : (b & ~(1 %3C%3C bit)));%0A    %7D%0A%0A    public short setBit(short s, int bit, boolean state)%7B%0A        return (short) (state ? (s %7C 1 %3C%3C bit) : (s & ~(1 %3C%3C bit)));%0A    %7D%0A%0A    public int setBit(int i, int bit, boolean state)%7B%0A        return (int) (state ? (i %7C 1 %3C%3C bit) : (i & ~(1 %3C%3C bit)));%0A    %7D%0A%0A    public long setBit(long l, int bit, boolean state)%7B%0A        return (long) (state ? (l %7C 1 %3C%3C bit) : (l & ~(1 %3C%3C bit)));%0A    %7D%0A%0A%7D%0A

Add BitUtils