Exemplo n.º 1
0
        /* Swap integer bytes. */
        private int Swap(int value)
        {
            byte[] inBytes = IntUtils.ToBytes(value);
            return(IntUtils.BytesToInteger(
                       new byte[4] {
                inBytes[3], inBytes[2], inBytes[1], inBytes[0]
            }));

            /*return ((value & 0x000000ff) << 24) |
             *      ((value & 0x0000ff00) << 8) |
             *      ((value & 0x00ff0000) >> 8) |
             *      ((value & 0xff000000) >> 24);*/
        }
Exemplo n.º 2
0
 public void PutInt(uint data)
 {
     Put(IntUtils.ToBytes(data));
 }