PageRenderTime 363ms CodeModel.GetById 181ms app.highlight 2ms RepoModel.GetById 179ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/socket.io-client/lib/vendor/web-socket-js/flash-src/com/hurlant/util/ArrayUtil.as

http://github.com/onedayitwillmake/RealtimeMultiplayerNodeJs
ActionScript | 25 lines | 13 code | 4 blank | 8 comment | 4 complexity | d764ee34d244f1dedca16b5741648097 MD5 | raw file
 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 */
 9package 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}