tweetcast/client/lib/websocket-js/flash-src/third-party/com/hurlant/util/ArrayUtil.as
changeset 306 70c9688a1486
parent 305 436a31d11f1d
equal deleted inserted replaced
305:436a31d11f1d 306:70c9688a1486
       
     1 /**
       
     2  * ArrayUtil
       
     3  * 
       
     4  * A class that allows to compare two ByteArrays.
       
     5  * Copyright (c) 2007 Henri Torgemane
       
     6  * 
       
     7  * See LICENSE.txt for full license information.
       
     8  */
       
     9 package com.hurlant.util {
       
    10 	import flash.utils.ByteArray;
       
    11 	
       
    12 	
       
    13 	public class ArrayUtil {
       
    14 		
       
    15 		public static function equals(a1:ByteArray, a2:ByteArray):Boolean {
       
    16 			if (a1.length != a2.length) return false;
       
    17 			var l:int = a1.length;
       
    18 			for (var i:int=0;i<l;i++) {
       
    19 				if (a1[i]!=a2[i]) return false;
       
    20 			}
       
    21 			return true;
       
    22 		}
       
    23 	}
       
    24 	
       
    25 }