tweetcast/client/lib/websocket-js/flash-src/third-party/com/hurlant/util/ArrayUtil.as
author Raphael Velt <raph.velt@gmail.com>
Mon, 10 Oct 2011 15:24:28 +0200
changeset 310 526d3e411736
parent 306 70c9688a1486
permissions -rwxr-xr-x
Merge

/**
 * 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;
		}
	}
	
}