public abstract class bitwiseUtil{

	public static final short makeShortFromByte2(byte[] b){
		return (short) ((b[0] & 0xff) << 8 | (b[1] & 0xff));
	}

	public static final byte[] makeByte2FromShort(short i){
		return new byte[] { (byte) (i >> 8), (byte) i };
	}

	public static final int makeIntFromByte4(byte[] b){
		return b[0] << 24 | (b[1] & 0xff) << 16 | (b[2] & 0xff) << 8
				| (b[3] & 0xff);
	}

	public static final byte[] makeByte4FromInt(int i){
		return new byte[] { (byte) (i >> 24), (byte) (i >> 16),
				(byte) (i >> 8), (byte) i };
	}
	/*
	 * public static final short unsignedByte(byte inByte){ short outShort = 0;
	 * int firstByte = (0x000000FF & ((int)inByte)); outShort =
	 * (short)firstByte;
	 * 
	 * }
	 */
}