Example #1
0
		public static long ReadLong(ByteArrayInputStream @in)
		{
			long ret = 0;
			for (int i = 0; i < LongLength; i++)
			{
				ret = (ret << 8) + ((byte)@in.Read() & unchecked((int)(0xff)));
			}
			return ret;
		}
Example #2
0
		public static int ReadInt(ByteArrayInputStream @in)
		{
			return (@in.Read() << 24) | ((@in.Read() & 255) << 16) | ((@in.Read() & 255) << 8
				) | (@in.Read() & 255);
		}