aboutsummaryrefslogtreecommitdiffstats
path: root/signaling-server/node_modules/socket.io/node_modules/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/ArrayUtil.as
blob: b02b8d520fa550e1d6d91a384e3fa82ce3b2c059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
 * ArrayUtil
 * 
 * A class that allows to compare two ByteArrays.
 * Copyright (c) 2007 Henri Torgemane
 * 
 * See LICENSE.txt for full license information.
 */
package com.hurlant.util {
	import flash.utils.ByteArray;
	
	
	public class ArrayUtil {
		
		public static function equals(a1:ByteArray, a2:ByteArray):Boolean {
			if (a1.length != a2.length) return false;
			var l:int = a1.length;
			for (var i:int=0;i<l;i++) {
				if (a1[i]!=a2[i]) return false;
			}
			return true;
		}
	}
	
}