Exemple #1
0
        public void putInt(int val)
        {
            putByte(JavaCompat.GetBytesBig(val));

            /*
             * uint uval = (uint)val;
             * tmp[0] = (byte)(uval >> 24);
             * tmp[1] = (byte)(uval >> 16);
             * tmp[2] = (byte)(uval >> 8);
             * tmp[3] = (byte)(uval);
             * Array.Copy(tmp, 0, buffer, index, 4);
             * index += 4;
             */
        }
Exemple #2
0
        public void putLong(long val)
        {
            putByte(JavaCompat.GetBytesBig(val));

            /*
             * ulong uval = (ulong)val;
             * tmp[0] = (byte)(uval >> 56);
             * tmp[1] = (byte)(uval >> 48);
             * tmp[2] = (byte)(uval >> 40);
             * tmp[3] = (byte)(uval >> 32);
             * Array.Copy(tmp, 0, buffer, index, 4);
             * tmp[0] = (byte)(uval >> 24);
             * tmp[1] = (byte)(uval >> 16);
             * tmp[2] = (byte)(uval >> 8);
             * tmp[3] = (byte)(uval);
             * Array.Copy(tmp, 0, buffer, index + 4, 4);
             * index += 8;
             */
        }