build configs and use libraries rather than include source trees for externals
authorDave Stubbs <osm@randomjunk.co.uk>
Fri, 11 Sep 2009 10:15:16 +0000 (10:15 +0000)
committerDave Stubbs <osm@randomjunk.co.uk>
Fri, 11 Sep 2009 10:15:16 +0000 (10:15 +0000)
100 files changed:
README.txt
com/adobe/air/logging/FileTarget.as [deleted file]
com/adobe/crypto/HMAC.as [deleted file]
com/adobe/crypto/MD5.as [deleted file]
com/adobe/crypto/MD5Stream.as [deleted file]
com/adobe/crypto/SHA1.as [deleted file]
com/adobe/crypto/SHA224.as [deleted file]
com/adobe/crypto/SHA256.as [deleted file]
com/adobe/crypto/WSSEUsernameToken.as [deleted file]
com/adobe/errors/IllegalStateError.as [deleted file]
com/adobe/fileformats/vcard/Address.as [deleted file]
com/adobe/fileformats/vcard/Email.as [deleted file]
com/adobe/fileformats/vcard/Phone.as [deleted file]
com/adobe/fileformats/vcard/VCard.as [deleted file]
com/adobe/fileformats/vcard/VCardParser.as [deleted file]
com/adobe/images/BitString.as [deleted file]
com/adobe/images/JPGEncoder.as [deleted file]
com/adobe/images/PNGEncoder.as [deleted file]
com/adobe/net/DynamicURLLoader.as [deleted file]
com/adobe/net/IURIResolver.as [deleted file]
com/adobe/net/MimeTypeMap.as [deleted file]
com/adobe/net/URI.as [deleted file]
com/adobe/net/URIEncodingBitmap.as [deleted file]
com/adobe/net/proxies/RFC2817Socket.as [deleted file]
com/adobe/protocols/dict/Database.as [deleted file]
com/adobe/protocols/dict/Definition.as [deleted file]
com/adobe/protocols/dict/Dict.as [deleted file]
com/adobe/protocols/dict/DictionaryServer.as [deleted file]
com/adobe/protocols/dict/MatchStrategy.as [deleted file]
com/adobe/protocols/dict/Response.as [deleted file]
com/adobe/protocols/dict/events/ConnectedEvent.as [deleted file]
com/adobe/protocols/dict/events/DatabaseEvent.as [deleted file]
com/adobe/protocols/dict/events/DefinitionEvent.as [deleted file]
com/adobe/protocols/dict/events/DefinitionHeaderEvent.as [deleted file]
com/adobe/protocols/dict/events/DictionaryServerEvent.as [deleted file]
com/adobe/protocols/dict/events/DisconnectedEvent.as [deleted file]
com/adobe/protocols/dict/events/ErrorEvent.as [deleted file]
com/adobe/protocols/dict/events/MatchEvent.as [deleted file]
com/adobe/protocols/dict/events/MatchStrategiesEvent.as [deleted file]
com/adobe/protocols/dict/events/NoMatchEvent.as [deleted file]
com/adobe/protocols/dict/util/CompleteResponseEvent.as [deleted file]
com/adobe/protocols/dict/util/SocketHelper.as [deleted file]
com/adobe/serialization/json/JSON.as [deleted file]
com/adobe/serialization/json/JSONDecoder.as [deleted file]
com/adobe/serialization/json/JSONEncoder.as [deleted file]
com/adobe/serialization/json/JSONParseError.as [deleted file]
com/adobe/serialization/json/JSONToken.as [deleted file]
com/adobe/serialization/json/JSONTokenType.as [deleted file]
com/adobe/serialization/json/JSONTokenizer.as [deleted file]
com/adobe/utils/ArrayUtil.as [deleted file]
com/adobe/utils/DateUtil.as [deleted file]
com/adobe/utils/DictionaryUtil.as [deleted file]
com/adobe/utils/IntUtil.as [deleted file]
com/adobe/utils/NumberFormatter.as [deleted file]
com/adobe/utils/StringUtil.as [deleted file]
com/adobe/utils/XMLUtil.as [deleted file]
com/adobe/webapis/ServiceBase.as [deleted file]
com/adobe/webapis/URLLoaderBase.as [deleted file]
com/adobe/webapis/events/ServiceEvent.as [deleted file]
debug-config.xml [new file with mode: 0755]
halcyon-viewer-config.xml [new file with mode: 0755]
lib/as3corelib.swc [new file with mode: 0644]
lib/as3crypto.swc [new file with mode: 0644]
lib/iotashan-oath.swc [new file with mode: 0644]
org/idmedia/as3commons/lang/ConcurrentModificationException.as [deleted file]
org/idmedia/as3commons/lang/Exception.as [deleted file]
org/idmedia/as3commons/lang/IllegalArgumentException.as [deleted file]
org/idmedia/as3commons/lang/IllegalStateException.as [deleted file]
org/idmedia/as3commons/lang/IndexOutOfBoundsException.as [deleted file]
org/idmedia/as3commons/lang/NoSuchElementException.as [deleted file]
org/idmedia/as3commons/lang/NullPointerException.as [deleted file]
org/idmedia/as3commons/lang/Throwable.as [deleted file]
org/idmedia/as3commons/lang/UnsupportedOperationException.as [deleted file]
org/idmedia/as3commons/util/AbstractCollection.as [deleted file]
org/idmedia/as3commons/util/AbstractList.as [deleted file]
org/idmedia/as3commons/util/AbstractMap.as [deleted file]
org/idmedia/as3commons/util/AbstractSet.as [deleted file]
org/idmedia/as3commons/util/ArrayList.as [deleted file]
org/idmedia/as3commons/util/Arrays.as [deleted file]
org/idmedia/as3commons/util/Collection.as [deleted file]
org/idmedia/as3commons/util/Collections.as [deleted file]
org/idmedia/as3commons/util/Comparator.as [deleted file]
org/idmedia/as3commons/util/Entry.as [deleted file]
org/idmedia/as3commons/util/EntrySet.as [deleted file]
org/idmedia/as3commons/util/EntrySetIterator.as [deleted file]
org/idmedia/as3commons/util/HashMap.as [deleted file]
org/idmedia/as3commons/util/HashSet.as [deleted file]
org/idmedia/as3commons/util/Iterator.as [deleted file]
org/idmedia/as3commons/util/List.as [deleted file]
org/idmedia/as3commons/util/ListIterator.as [deleted file]
org/idmedia/as3commons/util/Map.as [deleted file]
org/idmedia/as3commons/util/Observable.as [deleted file]
org/idmedia/as3commons/util/Observer.as [deleted file]
org/idmedia/as3commons/util/Set.as [deleted file]
org/idmedia/as3commons/util/StringUtils.as [deleted file]
org/rxr/actionscript/io/StringReader.as [deleted file]
org/rxr/actionscript/io/StringWriter.as [deleted file]
potlatch2-config.xml [new file with mode: 0755]
potlatch2.mxml [moved from halcyon.mxml with 100% similarity]
resources/potlatch2.html [new file with mode: 0644]

index a5057c1..33e3f3a 100644 (file)
@@ -16,20 +16,40 @@ Both are written in ActionScript 3. Potlatch 2.0 additionally uses the Flex fram
 
 === How to compile and run ===
 
-Compiling:
+Compiling Potlatch 2:
+
+The following command will compile potlatch2 in optimized configuration
+The result is put at resources/potlatch2.swf
+
+* mxmlc potlatch2.mxml
+
+
+Compiling Halcyon as standalone viewer:
+
+* mxmlc halcyon_viewer.as
+
+
+Compiling during development:
+
+Compiling optimized versions from scratch takes a _long_ time. There are
+several ways to make it faster during development and also add useful
+debug stack traces and enable the commandline debugger (at the expense
+of a much larger swf file.. but we're developing so that doesn't matter!).
 
 * fcsh
-  - launches the Flex Compiler SHell
+  - launches the Flex Compiler SHell -- stops the compiler having to
+    bootstrap itself each time you invoke it. You don't /need/ this, but it
+    does make things slightly faster (about a second a shot for me)
 
-* mxmlc -managers=flash.fonts.AFEFontManager -output=/path/to/halcyon.swf /path/to/halcyon.mxml 
-* mxmlc -managers=flash.fonts.AFEFontManager -output=/path/to/halcyon_viewer.swf /path/to/halcyon_viewer.as
-  - compile Potlatch or Halcyon for the first time
+* mxmlc -load-config+=debug-config.xml potlatch2.mxml
+  - compile potlatch2 in debug configuration -- build is incremental so you
+    can run it again and mxmlc will only compile changes. Output has debug
+    enabled along with decent stack traces.
+    (you can substitute halcyon_viewer.as in the above to compile that)
 
 * compile 1 
-  - compile each subsequent time (_much_ faster than using mxmlc every time)
+  - when using fcsh recompile the first command
 
-* for nice debug reports compile with the mxmlc command:
-  mxmlc -managers=flash.fonts.AFEFontManager -compiler.debug -compiler.verbose-stacktraces -output=halcyon.swf halcyon.mxml
 
 Running:
 
@@ -39,9 +59,12 @@ Running:
 === Some other stuff you might need to know ===
 
 * The as3yaml library has been patched a bit to actually make it work. It will nonetheless spit out 300 warnings on Flex SDK 3.3.
-* The stuff about -managers=flash.fonts.AFEFontManager is probably only required on OS X.
 * Flex compiler runs at about the speed of a tortoise soaked in molasses which happens also to be dead.
 
 
 Richard Fairhurst
 richard@systemeD.net
+
+Dave Stubbs
+osm@randomjunk.co.uk
+
diff --git a/com/adobe/air/logging/FileTarget.as b/com/adobe/air/logging/FileTarget.as
deleted file mode 100644 (file)
index 0dda3eb..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package com.adobe.air.logging
-{
-       import mx.logging.AbstractTarget;
-       import flash.filesystem.File;
-       import flash.filesystem.FileStream;
-       import flash.filesystem.FileMode;
-       import mx.logging.LogEvent;
-       import flash.system.System;
-       import flash.system.Capabilities;
-       import mx.logging.targets.LineFormattedTarget;
-       import mx.core.mx_internal;
-       
-       use namespace mx_internal;
-
-       /**
-        * An Adobe AIR only class that provides a log target for the Flex logging
-        * framework, that logs files to a file on the user's system.
-        * 
-        * This class will only work when running within Adobe AIR>
-        */
-       public class FileTarget extends LineFormattedTarget
-       {
-               private const DEFAULT_LOG_PATH:String = "app-storage:/application.log";
-               
-               private var log:File;
-               
-               public function FileTarget(logFile:File = null)
-               {
-                       if(logFile != null)
-                       {
-                               log = logFile;
-                       }
-                       else
-                       {
-                               log = new File(DEFAULT_LOG_PATH);
-                       }
-               }
-               
-               public function get logURI():String
-               {
-                       return log.url;
-               }
-               
-               mx_internal override function internalLog(message:String):void
-           {
-                       write(message);
-           }           
-               
-               private function write(msg:String):void
-               {               
-                       var fs:FileStream = new FileStream();
-                               fs.open(log, FileMode.APPEND);
-                               fs.writeUTFBytes(msg + "\n");
-                               fs.close();
-               }       
-               
-               public function clear():void
-               {
-                       var fs:FileStream = new FileStream();
-                               fs.open(log, FileMode.WRITE);
-                               fs.writeUTFBytes("");
-                               fs.close();                     
-               }
-               
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/crypto/HMAC.as b/com/adobe/crypto/HMAC.as
deleted file mode 100644 (file)
index 72f9bff..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto {\r
-       import flash.utils.ByteArray;\r
-       import flash.utils.Endian;\r
-       import flash.utils.describeType;\r
-       /**\r
-        * Keyed-Hashing for Message Authentication\r
-        * Implementation based on algorithm description at \r
-        * http://www.faqs.org/rfcs/rfc2104.html\r
-        */\r
-       public class HMAC \r
-       {\r
-               /**\r
-                * Performs the HMAC hash algorithm using byte arrays.\r
-                *\r
-                * @param secret The secret key\r
-                * @param message The message to hash\r
-                * @param algorithm Hash object to use\r
-                * @return A string containing the hash value of message\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 8.5\r
-                * @tiptext\r
-                */\r
-               public static function hash( secret:String, message:String, algorithm:Object = null ):String\r
-               {\r
-                       var text:ByteArray = new ByteArray();\r
-                       var k_secret:ByteArray = new ByteArray();\r
-                       \r
-                       text.writeUTFBytes(message);\r
-                       k_secret.writeUTFBytes(secret);\r
-                       \r
-                       return hashBytes(k_secret, text, algorithm);\r
-               }\r
-               \r
-               /**\r
-                * Performs the HMAC hash algorithm using string.\r
-                *\r
-                * @param secret The secret key\r
-                * @param message The message to hash\r
-                * @param algorithm Hash object to use\r
-                * @return A string containing the hash value of message\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 8.5\r
-                * @tiptext\r
-                */\r
-               public static function hashBytes( secret:ByteArray, message:ByteArray, algorithm:Object = null ):String\r
-               {\r
-                       var ipad:ByteArray = new ByteArray();\r
-                       var opad:ByteArray = new ByteArray();\r
-                       var endian:String = Endian.BIG_ENDIAN;\r
-                       \r
-                       if(algorithm == null){\r
-                               algorithm = MD5;\r
-                       }\r
-                       \r
-                       if ( describeType(algorithm).@name.toString() == "com.adobe.crypto::MD5" ) {\r
-                               endian = Endian.LITTLE_ENDIAN;\r
-                       }\r
-                       \r
-                       if ( secret.length > 64 ) {\r
-                               algorithm.hashBytes(secret);\r
-                               secret = new ByteArray();\r
-                               secret.endian = endian;\r
-                               \r
-                               while ( algorithm.digest.bytesAvailable != 0 ) {\r
-                                       secret.writeInt(algorithm.digest.readInt());\r
-                               }\r
-                       }\r
-\r
-                       secret.length = 64\r
-                       secret.position = 0;\r
-                       for ( var x:int = 0; x < 64; x++ ) {\r
-                               var byte:int = secret.readByte();\r
-                               ipad.writeByte(0x36 ^ byte);\r
-                               opad.writeByte(0x5c ^ byte);\r
-                       }\r
-                       \r
-                       ipad.writeBytes(message);\r
-                       algorithm.hashBytes(ipad);\r
-                       var tmp:ByteArray = new ByteArray();\r
-                       tmp.endian = endian;    \r
-                       \r
-                       while ( algorithm.digest.bytesAvailable != 0 ) {\r
-                               tmp.writeInt(algorithm.digest.readInt());\r
-                       }\r
-                       tmp.position = 0;\r
-                       \r
-                       while ( tmp.bytesAvailable != 0 ) {\r
-                               opad.writeByte(tmp.readUnsignedByte());\r
-                       }\r
-                       return algorithm.hashBytes( opad );\r
-               }\r
-               \r
-       }\r
-       \r
-}\r
diff --git a/com/adobe/crypto/MD5.as b/com/adobe/crypto/MD5.as
deleted file mode 100644 (file)
index da533cc..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package com.adobe.crypto {
-       
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;   
-       /**
-        * The MD5 Message-Digest Algorithm
-        *
-        * Implementation based on algorithm description at 
-        * http://www.faqs.org/rfcs/rfc1321.html
-        */
-       public class MD5 {
-               
-               public static var digest:ByteArray;
-               /**
-                * Performs the MD5 hash algorithm on a string.
-                *
-                * @param s The string to hash
-                * @return A string containing the hash value of s
-                * @langversion ActionScript 3.0
-                * @playerversion Flash 8.5
-                * @tiptext
-                */
-                
-               public static function hash(s:String) :String{
-                       //Convert to byteArray and send through hashBinary function
-                       // so as to only have complex code in one location
-                       var ba:ByteArray = new ByteArray();
-                       ba.writeUTFBytes(s);    
-                       return hashBinary(ba);
-               }
-               
-               public static function hashBytes(s:ByteArray) :String{  
-                       return hashBinary(s);
-               }
-               
-               /**
-                * Performs the MD5 hash algorithm on a ByteArray.
-                *
-                * @param s The string to hash
-                * @return A string containing the hash value of s
-                * @langversion ActionScript 3.0
-                * @playerversion Flash 8.5
-                * @tiptext
-                */      
-               public static function hashBinary( s:ByteArray ):String {
-                       // initialize the md buffers
-                       var a:int = 1732584193;
-                       var b:int = -271733879;
-                       var c:int = -1732584194;
-                       var d:int = 271733878;
-                       
-                       // variables to store previous values
-                       var aa:int;
-                       var bb:int;
-                       var cc:int;
-                       var dd:int;
-                       
-                       // create the blocks from the string and
-                       // save the length as a local var to reduce
-                       // lookup in the loop below
-                       var x:Array = createBlocks( s );
-                       var len:int = x.length;
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16) {
-                               // save previous values
-                               aa = a;
-                               bb = b;
-                               cc = c;
-                               dd = d;                         
-                               
-                               // Round 1
-                               a = ff( a, b, c, d, x[int(i+ 0)],  7, -680876936 );     // 1
-                               d = ff( d, a, b, c, x[int(i+ 1)], 12, -389564586 );     // 2
-                               c = ff( c, d, a, b, x[int(i+ 2)], 17, 606105819 );      // 3
-                               b = ff( b, c, d, a, x[int(i+ 3)], 22, -1044525330 );    // 4
-                               a = ff( a, b, c, d, x[int(i+ 4)],  7, -176418897 );     // 5
-                               d = ff( d, a, b, c, x[int(i+ 5)], 12, 1200080426 );     // 6
-                               c = ff( c, d, a, b, x[int(i+ 6)], 17, -1473231341 );    // 7
-                               b = ff( b, c, d, a, x[int(i+ 7)], 22, -45705983 );      // 8
-                               a = ff( a, b, c, d, x[int(i+ 8)],  7, 1770035416 );     // 9
-                               d = ff( d, a, b, c, x[int(i+ 9)], 12, -1958414417 );    // 10
-                               c = ff( c, d, a, b, x[int(i+10)], 17, -42063 );                 // 11
-                               b = ff( b, c, d, a, x[int(i+11)], 22, -1990404162 );    // 12
-                               a = ff( a, b, c, d, x[int(i+12)],  7, 1804603682 );     // 13
-                               d = ff( d, a, b, c, x[int(i+13)], 12, -40341101 );      // 14
-                               c = ff( c, d, a, b, x[int(i+14)], 17, -1502002290 );    // 15
-                               b = ff( b, c, d, a, x[int(i+15)], 22, 1236535329 );     // 16
-                               
-                               // Round 2
-                               a = gg( a, b, c, d, x[int(i+ 1)],  5, -165796510 );     // 17
-                               d = gg( d, a, b, c, x[int(i+ 6)],  9, -1069501632 );    // 18
-                               c = gg( c, d, a, b, x[int(i+11)], 14, 643717713 );      // 19
-                               b = gg( b, c, d, a, x[int(i+ 0)], 20, -373897302 );     // 20
-                               a = gg( a, b, c, d, x[int(i+ 5)],  5, -701558691 );     // 21
-                               d = gg( d, a, b, c, x[int(i+10)],  9, 38016083 );       // 22
-                               c = gg( c, d, a, b, x[int(i+15)], 14, -660478335 );     // 23
-                               b = gg( b, c, d, a, x[int(i+ 4)], 20, -405537848 );     // 24
-                               a = gg( a, b, c, d, x[int(i+ 9)],  5, 568446438 );      // 25
-                               d = gg( d, a, b, c, x[int(i+14)],  9, -1019803690 );    // 26
-                               c = gg( c, d, a, b, x[int(i+ 3)], 14, -187363961 );     // 27
-                               b = gg( b, c, d, a, x[int(i+ 8)], 20, 1163531501 );     // 28
-                               a = gg( a, b, c, d, x[int(i+13)],  5, -1444681467 );    // 29
-                               d = gg( d, a, b, c, x[int(i+ 2)],  9, -51403784 );      // 30
-                               c = gg( c, d, a, b, x[int(i+ 7)], 14, 1735328473 );     // 31
-                               b = gg( b, c, d, a, x[int(i+12)], 20, -1926607734 );    // 32
-                               
-                               // Round 3
-                               a = hh( a, b, c, d, x[int(i+ 5)],  4, -378558 );        // 33
-                               d = hh( d, a, b, c, x[int(i+ 8)], 11, -2022574463 );    // 34
-                               c = hh( c, d, a, b, x[int(i+11)], 16, 1839030562 );     // 35
-                               b = hh( b, c, d, a, x[int(i+14)], 23, -35309556 );      // 36
-                               a = hh( a, b, c, d, x[int(i+ 1)],  4, -1530992060 );    // 37
-                               d = hh( d, a, b, c, x[int(i+ 4)], 11, 1272893353 );     // 38
-                               c = hh( c, d, a, b, x[int(i+ 7)], 16, -155497632 );     // 39
-                               b = hh( b, c, d, a, x[int(i+10)], 23, -1094730640 );    // 40
-                               a = hh( a, b, c, d, x[int(i+13)],  4, 681279174 );      // 41
-                               d = hh( d, a, b, c, x[int(i+ 0)], 11, -358537222 );     // 42
-                               c = hh( c, d, a, b, x[int(i+ 3)], 16, -722521979 );     // 43
-                               b = hh( b, c, d, a, x[int(i+ 6)], 23, 76029189 );       // 44
-                               a = hh( a, b, c, d, x[int(i+ 9)],  4, -640364487 );     // 45
-                               d = hh( d, a, b, c, x[int(i+12)], 11, -421815835 );     // 46
-                               c = hh( c, d, a, b, x[int(i+15)], 16, 530742520 );      // 47
-                               b = hh( b, c, d, a, x[int(i+ 2)], 23, -995338651 );     // 48
-                               
-                               // Round 4
-                               a = ii( a, b, c, d, x[int(i+ 0)],  6, -198630844 );     // 49
-                               d = ii( d, a, b, c, x[int(i+ 7)], 10, 1126891415 );     // 50
-                               c = ii( c, d, a, b, x[int(i+14)], 15, -1416354905 );    // 51
-                               b = ii( b, c, d, a, x[int(i+ 5)], 21, -57434055 );      // 52
-                               a = ii( a, b, c, d, x[int(i+12)],  6, 1700485571 );     // 53
-                               d = ii( d, a, b, c, x[int(i+ 3)], 10, -1894986606 );    // 54
-                               c = ii( c, d, a, b, x[int(i+10)], 15, -1051523 );       // 55
-                               b = ii( b, c, d, a, x[int(i+ 1)], 21, -2054922799 );    // 56
-                               a = ii( a, b, c, d, x[int(i+ 8)],  6, 1873313359 );     // 57
-                               d = ii( d, a, b, c, x[int(i+15)], 10, -30611744 );      // 58
-                               c = ii( c, d, a, b, x[int(i+ 6)], 15, -1560198380 );    // 59
-                               b = ii( b, c, d, a, x[int(i+13)], 21, 1309151649 );     // 60
-                               a = ii( a, b, c, d, x[int(i+ 4)],  6, -145523070 );     // 61
-                               d = ii( d, a, b, c, x[int(i+11)], 10, -1120210379 );    // 62
-                               c = ii( c, d, a, b, x[int(i+ 2)], 15, 718787259 );      // 63
-                               b = ii( b, c, d, a, x[int(i+ 9)], 21, -343485551 );     // 64
-
-                               a += aa;
-                               b += bb;
-                               c += cc;
-                               d += dd;
-                       }
-                       digest = new ByteArray()
-                       digest.writeInt(a);
-                       digest.writeInt(b);
-                       digest.writeInt(c);
-                       digest.writeInt(d);
-                       digest.position = 0;
-                       // Finish up by concatening the buffers with their hex output
-                       return IntUtil.toHex( a ) + IntUtil.toHex( b ) + IntUtil.toHex( c ) + IntUtil.toHex( d );
-               }
-               
-               /**
-                * Auxiliary function f as defined in RFC
-                */
-               private static function f( x:int, y:int, z:int ):int {
-                       return ( x & y ) | ( (~x) & z );
-               }
-               
-               /**
-                * Auxiliary function g as defined in RFC
-                */
-               private static function g( x:int, y:int, z:int ):int {
-                       return ( x & z ) | ( y & (~z) );
-               }
-               
-               /**
-                * Auxiliary function h as defined in RFC
-                */
-               private static function h( x:int, y:int, z:int ):int {
-                       return x ^ y ^ z;
-               }
-               
-               /**
-                * Auxiliary function i as defined in RFC
-                */
-               private static function i( x:int, y:int, z:int ):int {
-                       return y ^ ( x | (~z) );
-               }
-               
-               /**
-                * A generic transformation function.  The logic of ff, gg, hh, and
-                * ii are all the same, minus the function used, so pull that logic
-                * out and simplify the method bodies for the transoformation functions.
-                */
-               private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {
-                       var tmp:int = a + int( func( b, c, d ) ) + x + t;
-                       return IntUtil.rol( tmp, s ) +  b;
-               }
-               
-               /**
-                * ff transformation function
-                */
-               private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( f, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * gg transformation function
-                */
-               private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( g, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * hh transformation function
-                */
-               private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( h, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * ii transformation function
-                */
-               private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {
-                       return transform( i, a, b, c, d, x, s, t );
-               }
-               
-               /**
-                * Converts a string to a sequence of 16-word blocks
-                * that we'll do the processing on.  Appends padding
-                * and length in the process.
-                *
-                * @param s The string to split into blocks
-                * @return An array containing the blocks that s was
-                *                      split into.
-                */
-               private static function createBlocks( s:ByteArray ):Array {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ int(i >> 5) ] |= ( s[ i / 8 ] & mask ) << ( i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ int(len >> 5) ] |= 0x80 << ( len % 32 );
-                       blocks[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;
-                       return blocks;
-               }
-               
-       }
-}
diff --git a/com/adobe/crypto/MD5Stream.as b/com/adobe/crypto/MD5Stream.as
deleted file mode 100644 (file)
index 6e5eed0..0000000
+++ /dev/null
@@ -1,402 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-    import com.adobe.utils.IntUtil;   \r
-    import flash.utils.ByteArray;\r
-\r
-    /**\r
-     * Perform MD5 hash of an input stream in chunks. This class is\r
-     * based on com.adobe.crypto.MD5 and can process data in\r
-     * chunks. Both block creation and hash computation are done\r
-     * together for whatever input is available so that the memory\r
-     * overhead at a time is always fixed. Memory usage is governed by\r
-     * two parameters: one is the amount of data passed in to update()\r
-     * and the other is memoryBlockSize. The latter comes into play\r
-     * only when the memory window exceeds the pre allocated memory\r
-     * window of flash player. Usage: create an instance, call\r
-     * update(data) repeatedly for all chunks and finally complete()\r
-     * which will return the md5 hash.\r
-     */      \r
-    public class MD5Stream\r
-    {\r
-        private static var mask:int = 0xFF;\r
-\r
-        private var arr:Array = [];\r
-\r
-        /* running count of length */\r
-        private var arrLen:int;\r
-        \r
-        // initialize the md buffers\r
-        private var a:int = 1732584193;\r
-        private var b:int = -271733879;\r
-        private var c:int = -1732584194;\r
-        private var d:int = 271733878;\r
-        \r
-        // variables to store previous values\r
-        private var aa:int;\r
-        private var bb:int;\r
-        private var cc:int;\r
-        private var dd:int;\r
-\r
-        /* index for data read */\r
-        private var arrIndexLen:int = 0;\r
-        /* index for hash computation */\r
-        private var arrProcessIndex:int = 0;\r
-        /* index for removing stale arr values */\r
-        private var cleanIndex:int = 0;\r
-        \r
-        /** \r
-         * Change this value from the default (16384) in the range of\r
-         * MBs to actually affect GC as GC allocates in pools of\r
-         * memory */\r
-        public var memoryBlockSize:int = 16384;\r
-        \r
-        \r
-        public function MD5Stream()\r
-        {\r
-            \r
-        }\r
-               \r
-        \r
-        /**\r
-         * Pass in chunks of the input data with update(), call\r
-         * complete() with an optional chunk which will return the\r
-         * final hash. Equivalent to the way\r
-         * java.security.MessageDigest works.\r
-         *\r
-         * @param input The optional bytearray chunk which is the final part of the input\r
-         * @return A string containing the hash value\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */\r
-        public function complete(input:ByteArray=null):String\r
-        {\r
-            if ( arr.length == 0 )\r
-            {\r
-                if ( input == null )\r
-                {\r
-                    throw new Error("null input to complete without prior call to update. At least an empty bytearray must be passed.");\r
-                }                              \r
-            }\r
-            \r
-            if ( input != null )\r
-            {\r
-                readIntoArray(input);\r
-            }\r
-\r
-            //pad, append length\r
-            padArray(arrLen);\r
-\r
-            hashRemainingChunks(false);\r
-            \r
-            var res:String = IntUtil.toHex( a ) + IntUtil.toHex( b ) + \r
-                                        IntUtil.toHex( c ) + IntUtil.toHex( d );\r
-            resetFields();\r
-            \r
-            return res;\r
-        }\r
-\r
-        /**\r
-         * Pass in chunks of the input data with update(), call\r
-         * complete() with an optional chunk which will return the\r
-         * final hash. Equivalent to the way\r
-         * java.security.MessageDigest works.\r
-         *\r
-         * @param input The bytearray chunk to perform the hash on\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */        \r
-        public function update(input:ByteArray):void\r
-        {\r
-            readIntoArray(input);\r
-            hashRemainingChunks();\r
-        }\r
-\r
-        /**\r
-         * Re-initialize this instance for use to perform hashing on\r
-         * another input stream. This is called automatically by\r
-         * complete().\r
-         *\r
-         * @langversion ActionScript 3.0\r
-         * @playerversion Flash 8.5\r
-         * @tiptext\r
-         */               \r
-        public function resetFields():void\r
-        {\r
-            //truncate array\r
-            arr.length = 0;\r
-            arrLen = 0;\r
-            \r
-            // initialize the md buffers\r
-            a = 1732584193;\r
-            b = -271733879;\r
-            c = -1732584194;\r
-            d = 271733878;\r
-            \r
-            // variables to store previous values\r
-            aa = 0;\r
-            bb = 0;\r
-            cc = 0;\r
-            dd = 0;\r
-            \r
-            arrIndexLen = 0;            \r
-            arrProcessIndex = 0;\r
-            cleanIndex = 0;\r
-        }\r
-        \r
-        /** read into arr and free up used blocks of arr */\r
-        private function readIntoArray(input:ByteArray):void\r
-        {\r
-            var closestChunkLen:int = input.length * 8;\r
-            arrLen += closestChunkLen;\r
-            \r
-            /* clean up memory. if there are entries in the array that\r
-             * are already processed and the amount is greater than\r
-             * memoryBlockSize, create a new array, copy the last\r
-             * block into it and let the old one get picked up by\r
-             * GC. */\r
-            if ( arrProcessIndex - cleanIndex > memoryBlockSize )\r
-            {\r
-                var newarr:Array= new Array();\r
-                \r
-                /* AS Arrays in sparse arrays. arr[2002] can exist \r
-                 * without values for arr[0] - arr[2001] */\r
-                for ( var j:int = arrProcessIndex; j < arr.length; j++ )\r
-                {                                              \r
-                    newarr[j] = arr[j];\r
-                }\r
-                \r
-                cleanIndex = arrProcessIndex;\r
-                arr = null;\r
-                arr = newarr;\r
-            }\r
-            \r
-            for ( var k:int = 0; k < closestChunkLen; k+=8 )\r
-            {\r
-                //discard high bytes (convert to uint)\r
-                arr[ int(arrIndexLen >> 5) ] |= ( input[ k / 8 ] & mask ) << ( arrIndexLen % 32 );\r
-                arrIndexLen += 8;\r
-            }\r
-            \r
-            \r
-        }\r
-        \r
-        private function hashRemainingChunks(bUpdate:Boolean=true):void\r
-        {\r
-            var len:int = arr.length;\r
-\r
-            /* leave a 16 word block untouched if we are called from\r
-             * update. This is because, padArray() can modify the last\r
-             * block and this modification has to happen before we\r
-             * compute the hash.  */\r
-            if ( bUpdate )\r
-            {\r
-                len -= 16;\r
-            }\r
-\r
-            /* don't do anything if don't have a 16 word block. */\r
-            if ( arrProcessIndex >= len || len - arrProcessIndex < 15 )\r
-            {\r
-                return;\r
-            }\r
-\r
-            \r
-            for ( var i:int = arrProcessIndex; i < len ; i += 16, arrProcessIndex += 16) \r
-            {                  \r
-                // save previous values\r
-                aa = a;\r
-                bb = b;\r
-                cc = c;\r
-                dd = d;                         \r
-                \r
-                // Round 1\r
-                a = ff( a, b, c, d, arr[int(i+ 0)],  7, -680876936 );     // 1\r
-                d = ff( d, a, b, c, arr[int(i+ 1)], 12, -389564586 );     // 2\r
-                c = ff( c, d, a, b, arr[int(i+ 2)], 17, 606105819 );      // 3\r
-                b = ff( b, c, d, a, arr[int(i+ 3)], 22, -1044525330 );    // 4\r
-                a = ff( a, b, c, d, arr[int(i+ 4)],  7, -176418897 );     // 5\r
-                d = ff( d, a, b, c, arr[int(i+ 5)], 12, 1200080426 );     // 6\r
-                c = ff( c, d, a, b, arr[int(i+ 6)], 17, -1473231341 );    // 7\r
-                b = ff( b, c, d, a, arr[int(i+ 7)], 22, -45705983 );      // 8\r
-                a = ff( a, b, c, d, arr[int(i+ 8)],  7, 1770035416 );     // 9\r
-                d = ff( d, a, b, c, arr[int(i+ 9)], 12, -1958414417 );    // 10\r
-                c = ff( c, d, a, b, arr[int(i+10)], 17, -42063 );                 // 11\r
-                b = ff( b, c, d, a, arr[int(i+11)], 22, -1990404162 );    // 12\r
-                a = ff( a, b, c, d, arr[int(i+12)],  7, 1804603682 );     // 13\r
-                d = ff( d, a, b, c, arr[int(i+13)], 12, -40341101 );      // 14\r
-                c = ff( c, d, a, b, arr[int(i+14)], 17, -1502002290 );    // 15\r
-                b = ff( b, c, d, a, arr[int(i+15)], 22, 1236535329 );     // 16\r
-                \r
-                // Round 2\r
-                a = gg( a, b, c, d, arr[int(i+ 1)],  5, -165796510 );     // 17\r
-                d = gg( d, a, b, c, arr[int(i+ 6)],  9, -1069501632 );    // 18\r
-                c = gg( c, d, a, b, arr[int(i+11)], 14, 643717713 );      // 19\r
-                b = gg( b, c, d, a, arr[int(i+ 0)], 20, -373897302 );     // 20\r
-                a = gg( a, b, c, d, arr[int(i+ 5)],  5, -701558691 );     // 21\r
-                d = gg( d, a, b, c, arr[int(i+10)],  9, 38016083 );       // 22\r
-                c = gg( c, d, a, b, arr[int(i+15)], 14, -660478335 );     // 23\r
-                b = gg( b, c, d, a, arr[int(i+ 4)], 20, -405537848 );     // 24\r
-                a = gg( a, b, c, d, arr[int(i+ 9)],  5, 568446438 );      // 25\r
-                d = gg( d, a, b, c, arr[int(i+14)],  9, -1019803690 );    // 26\r
-                c = gg( c, d, a, b, arr[int(i+ 3)], 14, -187363961 );     // 27\r
-                b = gg( b, c, d, a, arr[int(i+ 8)], 20, 1163531501 );     // 28\r
-                a = gg( a, b, c, d, arr[int(i+13)],  5, -1444681467 );    // 29\r
-                d = gg( d, a, b, c, arr[int(i+ 2)],  9, -51403784 );      // 30\r
-                c = gg( c, d, a, b, arr[int(i+ 7)], 14, 1735328473 );     // 31\r
-                b = gg( b, c, d, a, arr[int(i+12)], 20, -1926607734 );    // 32\r
-                \r
-                // Round 3\r
-                a = hh( a, b, c, d, arr[int(i+ 5)],  4, -378558 );        // 33\r
-                d = hh( d, a, b, c, arr[int(i+ 8)], 11, -2022574463 );    // 34\r
-                c = hh( c, d, a, b, arr[int(i+11)], 16, 1839030562 );     // 35\r
-                b = hh( b, c, d, a, arr[int(i+14)], 23, -35309556 );      // 36\r
-                a = hh( a, b, c, d, arr[int(i+ 1)],  4, -1530992060 );    // 37\r
-                d = hh( d, a, b, c, arr[int(i+ 4)], 11, 1272893353 );     // 38\r
-                c = hh( c, d, a, b, arr[int(i+ 7)], 16, -155497632 );     // 39\r
-                b = hh( b, c, d, a, arr[int(i+10)], 23, -1094730640 );    // 40\r
-                a = hh( a, b, c, d, arr[int(i+13)],  4, 681279174 );      // 41\r
-                d = hh( d, a, b, c, arr[int(i+ 0)], 11, -358537222 );     // 42\r
-                c = hh( c, d, a, b, arr[int(i+ 3)], 16, -722521979 );     // 43\r
-                b = hh( b, c, d, a, arr[int(i+ 6)], 23, 76029189 );       // 44\r
-                a = hh( a, b, c, d, arr[int(i+ 9)],  4, -640364487 );     // 45\r
-                d = hh( d, a, b, c, arr[int(i+12)], 11, -421815835 );     // 46\r
-                c = hh( c, d, a, b, arr[int(i+15)], 16, 530742520 );      // 47\r
-                b = hh( b, c, d, a, arr[int(i+ 2)], 23, -995338651 );     // 48\r
-                \r
-                // Round 4\r
-                a = ii( a, b, c, d, arr[int(i+ 0)],  6, -198630844 );     // 49\r
-                d = ii( d, a, b, c, arr[int(i+ 7)], 10, 1126891415 );     // 50\r
-                c = ii( c, d, a, b, arr[int(i+14)], 15, -1416354905 );    // 51\r
-                b = ii( b, c, d, a, arr[int(i+ 5)], 21, -57434055 );      // 52\r
-                a = ii( a, b, c, d, arr[int(i+12)],  6, 1700485571 );     // 53\r
-                d = ii( d, a, b, c, arr[int(i+ 3)], 10, -1894986606 );    // 54\r
-                c = ii( c, d, a, b, arr[int(i+10)], 15, -1051523 );       // 55\r
-                b = ii( b, c, d, a, arr[int(i+ 1)], 21, -2054922799 );    // 56\r
-                a = ii( a, b, c, d, arr[int(i+ 8)],  6, 1873313359 );     // 57\r
-                d = ii( d, a, b, c, arr[int(i+15)], 10, -30611744 );      // 58\r
-                c = ii( c, d, a, b, arr[int(i+ 6)], 15, -1560198380 );    // 59\r
-                b = ii( b, c, d, a, arr[int(i+13)], 21, 1309151649 );     // 60\r
-                a = ii( a, b, c, d, arr[int(i+ 4)],  6, -145523070 );     // 61\r
-                d = ii( d, a, b, c, arr[int(i+11)], 10, -1120210379 );    // 62\r
-                c = ii( c, d, a, b, arr[int(i+ 2)], 15, 718787259 );      // 63\r
-                b = ii( b, c, d, a, arr[int(i+ 9)], 21, -343485551 );     // 64\r
-                \r
-                a += aa;\r
-                b += bb;\r
-                c += cc;\r
-                d += dd;\r
-                \r
-            }\r
-            \r
-        }\r
-        \r
-        private function padArray(len:int):void\r
-        {                      \r
-            arr[ int(len >> 5) ] |= 0x80 << ( len % 32 );\r
-            arr[ int(( ( ( len + 64 ) >>> 9 ) << 4 ) + 14) ] = len;\r
-            arrLen = arr.length;\r
-        }  \r
-        \r
-        /* Code below same as com.adobe.crypto.MD5 */ \r
-        \r
-        /**\r
-         * Auxiliary function f as defined in RFC\r
-         */\r
-        private static function f( x:int, y:int, z:int ):int {\r
-            return ( x & y ) | ( (~x) & z );\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function g as defined in RFC\r
-         */\r
-        private static function g( x:int, y:int, z:int ):int {\r
-            return ( x & z ) | ( y & (~z) );\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function h as defined in RFC\r
-         */\r
-        private static function h( x:int, y:int, z:int ):int {\r
-            return x ^ y ^ z;\r
-        }\r
-        \r
-        /**\r
-         * Auxiliary function i as defined in RFC\r
-         */\r
-        private static function i( x:int, y:int, z:int ):int {\r
-            return y ^ ( x | (~z) );\r
-        }\r
-        \r
-        /**\r
-         * A generic transformation function.  The logic of ff, gg, hh, and\r
-         * ii are all the same, minus the function used, so pull that logic\r
-         * out and simplify the method bodies for the transoformation functions.\r
-         */\r
-        private static function transform( func:Function, a:int, b:int, c:int, d:int, x:int, s:int, t:int):int {\r
-            var tmp:int = a + int( func( b, c, d ) ) + x + t;\r
-            return IntUtil.rol( tmp, s ) +  b;\r
-        }\r
-        \r
-        /**\r
-         * ff transformation function\r
-         */\r
-        private static function ff ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( f, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * gg transformation function\r
-         */\r
-        private static function gg ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( g, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * hh transformation function\r
-         */\r
-        private static function hh ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( h, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-        /**\r
-         * ii transformation function\r
-         */\r
-        private static function ii ( a:int, b:int, c:int, d:int, x:int, s:int, t:int ):int {\r
-            return transform( i, a, b, c, d, x, s, t );\r
-        }\r
-        \r
-    }\r
-}
\ No newline at end of file
diff --git a/com/adobe/crypto/SHA1.as b/com/adobe/crypto/SHA1.as
deleted file mode 100644 (file)
index 952f3c7..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-       import com.adobe.utils.IntUtil;\r
-       import flash.utils.ByteArray;\r
-       import mx.utils.Base64Encoder;\r
-       \r
-       /**\r
-        *  US Secure Hash Algorithm 1 (SHA1)\r
-        *\r
-        *  Implementation based on algorithm description at \r
-        *  http://www.faqs.org/rfcs/rfc3174.html\r
-        */\r
-       public class SHA1\r
-       {\r
-               public static var digest:ByteArray;\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a string.\r
-                *\r
-                *  @param s            The string to hash\r
-                *  @return                     A string containing the hash value of s\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                *  @tiptext\r
-                */\r
-               public static function hash( s:String ):String\r
-               {\r
-                       var blocks:Array = createBlocksFromString( s );\r
-                       var byteArray:ByteArray = hashBlocks( blocks );\r
-                       \r
-                       return IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true );\r
-               }\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a ByteArray.\r
-                *\r
-                *  @param data         The ByteArray data to hash\r
-                *  @return                     A string containing the hash value of data\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                */\r
-               public static function hashBytes( data:ByteArray ):String\r
-               {\r
-                       var blocks:Array = SHA1.createBlocksFromByteArray( data );\r
-                       var byteArray:ByteArray = hashBlocks(blocks);\r
-                       \r
-                       return IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true )\r
-                                       + IntUtil.toHex( byteArray.readInt(), true );\r
-               }\r
-               \r
-               /**\r
-                *  Performs the SHA1 hash algorithm on a string, then does\r
-                *  Base64 encoding on the result.\r
-                *\r
-                *  @param s            The string to hash\r
-                *  @return                     The base64 encoded hash value of s\r
-                *  @langversion        ActionScript 3.0\r
-                *  @playerversion      9.0\r
-                *  @tiptext\r
-                */\r
-               public static function hashToBase64( s:String ):String\r
-               {\r
-                       var blocks:Array = SHA1.createBlocksFromString( s );\r
-                       var byteArray:ByteArray = hashBlocks(blocks);\r
-\r
-                       // ByteArray.toString() returns the contents as a UTF-8 string,\r
-                       // which we can't use because certain byte sequences might trigger\r
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters\r
-                       // one by one.\r
-                       var charsInByteArray:String = "";\r
-                       byteArray.position = 0;\r
-                       for (var j:int = 0; j < byteArray.length; j++)\r
-                       {\r
-                               var byte:uint = byteArray.readUnsignedByte();\r
-                               charsInByteArray += String.fromCharCode(byte);\r
-                       }\r
-\r
-                       var encoder:Base64Encoder = new Base64Encoder();\r
-                       encoder.encode(charsInByteArray);\r
-                       return encoder.flush();\r
-               }\r
-               \r
-               private static function hashBlocks( blocks:Array ):ByteArray\r
-               {\r
-                       // initialize the h's\r
-                       var h0:int = 0x67452301;\r
-                       var h1:int = 0xefcdab89;\r
-                       var h2:int = 0x98badcfe;\r
-                       var h3:int = 0x10325476;\r
-                       var h4:int = 0xc3d2e1f0;\r
-                       \r
-                       var len:int = blocks.length;\r
-                       var w:Array = new Array( 80 );\r
-                       \r
-                       // loop over all of the blocks\r
-                       for ( var i:int = 0; i < len; i += 16 ) {\r
-                       \r
-                               // 6.1.c\r
-                               var a:int = h0;\r
-                               var b:int = h1;\r
-                               var c:int = h2;\r
-                               var d:int = h3;\r
-                               var e:int = h4;\r
-                               \r
-                               // 80 steps to process each block\r
-                               // TODO: unroll for faster execution, or 4 loops of\r
-                               // 20 each to avoid the k and f function calls\r
-                               for ( var t:int = 0; t < 80; t++ ) {\r
-                                       \r
-                                       if ( t < 16 ) {\r
-                                               // 6.1.a\r
-                                               w[ t ] = blocks[ i + t ];\r
-                                       } else {\r
-                                               // 6.1.b\r
-                                               w[ t ] = IntUtil.rol( w[ t - 3 ] ^ w[ t - 8 ] ^ w[ t - 14 ] ^ w[ t - 16 ], 1 );\r
-                                       }\r
-                                       \r
-                                       // 6.1.d\r
-                                       var temp:int = IntUtil.rol( a, 5 ) + f( t, b, c, d ) + e + int( w[ t ] ) + k( t );\r
-                                       \r
-                                       e = d;\r
-                                       d = c;\r
-                                       c = IntUtil.rol( b, 30 );\r
-                                       b = a;\r
-                                       a = temp;\r
-                               }\r
-                               \r
-                               // 6.1.e\r
-                               h0 += a;\r
-                               h1 += b;\r
-                               h2 += c;\r
-                               h3 += d;\r
-                               h4 += e;                \r
-                       }\r
-                       \r
-                       var byteArray:ByteArray = new ByteArray();\r
-                       byteArray.writeInt(h0);\r
-                       byteArray.writeInt(h1);\r
-                       byteArray.writeInt(h2);\r
-                       byteArray.writeInt(h3);\r
-                       byteArray.writeInt(h4);\r
-                       byteArray.position = 0;\r
-                       \r
-                       digest = new ByteArray();\r
-                       digest.writeBytes(byteArray);\r
-                       digest.position = 0;\r
-                       return byteArray;\r
-               }\r
-\r
-               /**\r
-                *  Performs the logical function based on t\r
-                */\r
-               private static function f( t:int, b:int, c:int, d:int ):int {\r
-                       if ( t < 20 ) {\r
-                               return ( b & c ) | ( ~b & d );\r
-                       } else if ( t < 40 ) {\r
-                               return b ^ c ^ d;\r
-                       } else if ( t < 60 ) {\r
-                               return ( b & c ) | ( b & d ) | ( c & d );\r
-                       }\r
-                       return b ^ c ^ d;\r
-               }\r
-               \r
-               /**\r
-                *  Determines the constant value based on t\r
-                */\r
-               private static function k( t:int ):int {\r
-                       if ( t < 20 ) {\r
-                               return 0x5a827999;\r
-                       } else if ( t < 40 ) {\r
-                               return 0x6ed9eba1;\r
-                       } else if ( t < 60 ) {\r
-                               return 0x8f1bbcdc;\r
-                       }\r
-                       return 0xca62c1d6;\r
-               }\r
-                                       \r
-               /**\r
-                *  Converts a ByteArray to a sequence of 16-word blocks\r
-                *  that we'll do the processing on.  Appends padding\r
-                *  and length in the process.\r
-                *\r
-                *  @param data         The data to split into blocks\r
-                *  @return                     An array containing the blocks into which data was split\r
-                */\r
-               private static function createBlocksFromByteArray( data:ByteArray ):Array\r
-               {\r
-                       var oldPosition:int = data.position;\r
-                       data.position = 0;\r
-                       \r
-                       var blocks:Array = new Array();\r
-                       var len:int = data.length * 8;\r
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
-                       for( var i:int = 0; i < len; i += 8 )\r
-                       {\r
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );\r
-                       }\r
-                       \r
-                       // append padding and length\r
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
-                       \r
-                       data.position = oldPosition;\r
-                       \r
-                       return blocks;\r
-               }\r
-                                       \r
-               /**\r
-                *  Converts a string to a sequence of 16-word blocks\r
-                *  that we'll do the processing on.  Appends padding\r
-                *  and length in the process.\r
-                *\r
-                *  @param s    The string to split into blocks\r
-                *  @return             An array containing the blocks that s was split into.\r
-                */\r
-               private static function createBlocksFromString( s:String ):Array\r
-               {\r
-                       var blocks:Array = new Array();\r
-                       var len:int = s.length * 8;\r
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF\r
-                       for( var i:int = 0; i < len; i += 8 ) {\r
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );\r
-                       }\r
-                       \r
-                       // append padding and length\r
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );\r
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;\r
-                       return blocks;\r
-               }\r
-               \r
-       }\r
-}\r
diff --git a/com/adobe/crypto/SHA224.as b/com/adobe/crypto/SHA224.as
deleted file mode 100644 (file)
index ee15453..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package com.adobe.crypto
-{
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;
-       import mx.utils.Base64Encoder;
-       
-       /**
-        * The SHA-224 algorithm
-        * 
-        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
-        */
-       public class SHA224
-       {
-               public static var digest:ByteArray;
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a string.
-                *
-                *  @param s            The string to hash
-                *  @return                     A string containing the hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hash( s:String ):String {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks( blocks );
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a ByteArray.
-                *
-                *  @param data         The ByteArray data to hash
-                *  @return                     A string containing the hash value of data
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                */
-               public static function hashBytes( data:ByteArray ):String
-               {
-                       var blocks:Array = createBlocksFromByteArray( data );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA224 hash algorithm on a string, then does
-                *  Base64 encoding on the result.
-                *
-                *  @param s            The string to hash
-                *  @return                     The base64 encoded hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hashToBase64( s:String ):String
-               {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-
-                       // ByteArray.toString() returns the contents as a UTF-8 string,
-                       // which we can't use because certain byte sequences might trigger
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
-                       // one by one.
-                       var charsInByteArray:String = "";
-                       byteArray.position = 0;
-                       for (var j:int = 0; j < byteArray.length; j++)
-                       {
-                               var byte:uint = byteArray.readUnsignedByte();
-                               charsInByteArray += String.fromCharCode(byte);
-                       }
-
-                       var encoder:Base64Encoder = new Base64Encoder();
-                       encoder.encode(charsInByteArray);
-                       return encoder.flush();
-               }
-               
-               private static function hashBlocks( blocks:Array ):ByteArray {
-                       var h0:int = 0xc1059ed8;
-                       var h1:int = 0x367cd507;
-                       var h2:int = 0x3070dd17;
-                       var h3:int = 0xf70e5939;
-                       var h4:int = 0xffc00b31;
-                       var h5:int = 0x68581511;
-                       var h6:int = 0x64f98fa7;
-                       var h7:int = 0xbefa4fa4;
-                       
-                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
-                       
-                       var len:int = blocks.length;
-                       var w:Array = new Array();
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16 ) {
-                               
-                               var a:int = h0;
-                               var b:int = h1;
-                               var c:int = h2;
-                               var d:int = h3;
-                               var e:int = h4;
-                               var f:int = h5;
-                               var g:int = h6;
-                               var h:int = h7;
-                               
-                               for(var t:int = 0; t < 64; t++) {
-                                       
-                                       if ( t < 16 ) {
-                                               w[t] = blocks[ i + t ];
-                                               if(isNaN(w[t])) { w[t] = 0; }
-                                       } else {
-                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
-                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
-                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
-                                       }
-                                       
-                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
-                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
-                                       var t2:int = s0 + maj;
-                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
-                                       var ch:int = (e & f) ^ ((~e) & g);
-                                       var t1:int = h + s1 + ch + k[t] + w[t];
-                                       
-                                       h = g;
-                                       g = f;
-                                       f = e;
-                                       e = d + t1;
-                                       d = c;
-                                       c = b;
-                                       b = a;
-                                       a = t1 + t2;
-                               }
-                                       
-                               //Add this chunk's hash to result so far:
-                               h0 += a;
-                               h1 += b;
-                               h2 += c;
-                               h3 += d;
-                               h4 += e;
-                               h5 += f;
-                               h6 += g;
-                               h7 += h;
-                       }
-                       
-                       var byteArray:ByteArray = new ByteArray();
-                       byteArray.writeInt(h0);
-                       byteArray.writeInt(h1);
-                       byteArray.writeInt(h2);
-                       byteArray.writeInt(h3);
-                       byteArray.writeInt(h4);
-                       byteArray.writeInt(h5);
-                       byteArray.writeInt(h6);
-                       byteArray.position = 0;
-                       
-                       digest = new ByteArray();
-                       digest.writeBytes(byteArray);
-                       digest.position = 0;
-                       return byteArray;
-               }
-               
-               /**
-                *  Converts a ByteArray to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param data         The data to split into blocks
-                *  @return                     An array containing the blocks into which data was split
-                */
-               private static function createBlocksFromByteArray( data:ByteArray ):Array
-               {
-                       var oldPosition:int = data.position;
-                       data.position = 0;
-                       
-                       var blocks:Array = new Array();
-                       var len:int = data.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 )
-                       {
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       
-                       data.position = oldPosition;
-                       
-                       return blocks;
-               }
-                                       
-               /**
-                *  Converts a string to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param s    The string to split into blocks
-                *  @return             An array containing the blocks that s was split into.
-                */
-               private static function createBlocksFromString( s:String ):Array
-               {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       return blocks;
-               }
-       }
-}
diff --git a/com/adobe/crypto/SHA256.as b/com/adobe/crypto/SHA256.as
deleted file mode 100644 (file)
index 09a2ba2..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package com.adobe.crypto
-{
-       import com.adobe.utils.IntUtil;
-       import flash.utils.ByteArray;
-       import mx.utils.Base64Encoder;
-       
-       /**
-        * The SHA-256 algorithm
-        * 
-        * @see http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf
-        */
-       public class SHA256
-       {
-               public static var digest:ByteArray;
-               /**
-                *  Performs the SHA256 hash algorithm on a string.
-                *
-                *  @param s            The string to hash
-                *  @return                     A string containing the hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hash( s:String ):String {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks( blocks );
-                       
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA256 hash algorithm on a ByteArray.
-                *
-                *  @param data         The ByteArray data to hash
-                *  @return                     A string containing the hash value of data
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                */
-               public static function hashBytes( data:ByteArray ):String
-               {
-                       var blocks:Array = createBlocksFromByteArray( data );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-                       
-                       return IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true )
-                                       + IntUtil.toHex( byteArray.readInt(), true );
-               }
-               
-               /**
-                *  Performs the SHA256 hash algorithm on a string, then does
-                *  Base64 encoding on the result.
-                *
-                *  @param s            The string to hash
-                *  @return                     The base64 encoded hash value of s
-                *  @langversion        ActionScript 3.0
-                *  @playerversion      9.0
-                *  @tiptext
-                */
-               public static function hashToBase64( s:String ):String
-               {
-                       var blocks:Array = createBlocksFromString( s );
-                       var byteArray:ByteArray = hashBlocks(blocks);
-
-                       // ByteArray.toString() returns the contents as a UTF-8 string,
-                       // which we can't use because certain byte sequences might trigger
-                       // a UTF-8 conversion.  Instead, we convert the bytes to characters
-                       // one by one.
-                       var charsInByteArray:String = "";
-                       byteArray.position = 0;
-                       for (var j:int = 0; j < byteArray.length; j++)
-                       {
-                               var byte:uint = byteArray.readUnsignedByte();
-                               charsInByteArray += String.fromCharCode(byte);
-                       }
-
-                       var encoder:Base64Encoder = new Base64Encoder();
-                       encoder.encode(charsInByteArray);
-                       return encoder.flush();
-               }
-               
-               private static function hashBlocks( blocks:Array ):ByteArray {
-                       var h0:int = 0x6a09e667;
-                       var h1:int = 0xbb67ae85;
-                       var h2:int = 0x3c6ef372;
-                       var h3:int = 0xa54ff53a;
-                       var h4:int = 0x510e527f;
-                       var h5:int = 0x9b05688c;
-                       var h6:int = 0x1f83d9ab;
-                       var h7:int = 0x5be0cd19;
-                       
-                       var k:Array = new Array(0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2);
-                       
-                       var len:int = blocks.length;
-                       var w:Array = new Array( 64 );
-                       
-                       // loop over all of the blocks
-                       for ( var i:int = 0; i < len; i += 16 ) {
-                               
-                               var a:int = h0;
-                               var b:int = h1;
-                               var c:int = h2;
-                               var d:int = h3;
-                               var e:int = h4;
-                               var f:int = h5;
-                               var g:int = h6;
-                               var h:int = h7;
-                               
-                               for(var t:int = 0; t < 64; t++) {
-                                       
-                                       if ( t < 16 ) {
-                                               w[t] = blocks[ i + t ];
-                                               if(isNaN(w[t])) { w[t] = 0; }
-                                       } else {
-                                               var ws0:int = IntUtil.ror(w[t-15], 7) ^ IntUtil.ror(w[t-15], 18) ^ (w[t-15] >>> 3);
-                                               var ws1:int = IntUtil.ror(w[t-2], 17) ^ IntUtil.ror(w[t-2], 19) ^ (w[t-2] >>> 10);
-                                               w[t] = w[t-16] + ws0 + w[t-7] + ws1;
-                                       }
-                                       
-                                       var s0:int = IntUtil.ror(a, 2) ^ IntUtil.ror(a, 13) ^ IntUtil.ror(a, 22);
-                                       var maj:int = (a & b) ^ (a & c) ^ (b & c);
-                                       var t2:int = s0 + maj;
-                                       var s1:int = IntUtil.ror(e, 6) ^ IntUtil.ror(e, 11) ^ IntUtil.ror(e, 25);
-                                       var ch:int = (e & f) ^ ((~e) & g);
-                                       var t1:int = h + s1 + ch + k[t] + w[t];
-                                       
-                                       h = g;
-                                       g = f;
-                                       f = e;
-                                       e = d + t1;
-                                       d = c;
-                                       c = b;
-                                       b = a;
-                                       a = t1 + t2;
-                               }
-                                       
-                               //Add this chunk's hash to result so far:
-                               h0 += a;
-                               h1 += b;
-                               h2 += c;
-                               h3 += d;
-                               h4 += e;
-                               h5 += f;
-                               h6 += g;
-                               h7 += h;
-                       }
-                       
-                       var byteArray:ByteArray = new ByteArray();
-                       byteArray.writeInt(h0);
-                       byteArray.writeInt(h1);
-                       byteArray.writeInt(h2);
-                       byteArray.writeInt(h3);
-                       byteArray.writeInt(h4);
-                       byteArray.writeInt(h5);
-                       byteArray.writeInt(h6);
-                       byteArray.writeInt(h7);
-                       byteArray.position = 0;
-                       
-                       digest = new ByteArray();
-                       digest.writeBytes(byteArray);
-                       digest.position = 0;
-                       return byteArray;
-               }
-               
-               /**
-                *  Converts a ByteArray to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param data         The data to split into blocks
-                *  @return                     An array containing the blocks into which data was split
-                */
-               private static function createBlocksFromByteArray( data:ByteArray ):Array
-               {
-                       var oldPosition:int = data.position;
-                       data.position = 0;
-                       
-                       var blocks:Array = new Array();
-                       var len:int = data.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 )
-                       {
-                               blocks[ i >> 5 ] |= ( data.readByte() & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       
-                       data.position = oldPosition;
-                       
-                       return blocks;
-               }
-                                       
-               /**
-                *  Converts a string to a sequence of 16-word blocks
-                *  that we'll do the processing on.  Appends padding
-                *  and length in the process.
-                *
-                *  @param s    The string to split into blocks
-                *  @return             An array containing the blocks that s was split into.
-                */
-               private static function createBlocksFromString( s:String ):Array
-               {
-                       var blocks:Array = new Array();
-                       var len:int = s.length * 8;
-                       var mask:int = 0xFF; // ignore hi byte of characters > 0xFF
-                       for( var i:int = 0; i < len; i += 8 ) {
-                               blocks[ i >> 5 ] |= ( s.charCodeAt( i / 8 ) & mask ) << ( 24 - i % 32 );
-                       }
-                       
-                       // append padding and length
-                       blocks[ len >> 5 ] |= 0x80 << ( 24 - len % 32 );
-                       blocks[ ( ( ( len + 64 ) >> 9 ) << 4 ) + 15 ] = len;
-                       return blocks;
-               }
-       }
-}
diff --git a/com/adobe/crypto/WSSEUsernameToken.as b/com/adobe/crypto/WSSEUsernameToken.as
deleted file mode 100644 (file)
index 92bbba6..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.crypto\r
-{\r
-       import mx.formatters.DateFormatter;\r
-       import mx.utils.Base64Encoder;\r
-       \r
-       /**\r
-        * Web Services Security Username Token\r
-        *\r
-        * Implementation based on algorithm description at \r
-        * http://www.oasis-open.org/committees/wss/documents/WSS-Username-02-0223-merged.pdf\r
-        */\r
-       public class WSSEUsernameToken\r
-       {\r
-               /**\r
-                * Generates a WSSE Username Token.\r
-                *\r
-                * @param username The username\r
-                * @param password The password\r
-                * @param nonce A cryptographically random nonce (if null, the nonce\r
-                * will be generated)\r
-                * @param timestamp The time at which the token is generated (if null,\r
-                * the time will be set to the moment of execution)\r
-                * @return The generated token\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */\r
-               public static function getUsernameToken(username:String, password:String, nonce:String=null, timestamp:Date=null):String\r
-               {\r
-                       if (nonce == null)\r
-                       {\r
-                               nonce = generateNonce();\r
-                       }\r
-                       nonce = base64Encode(nonce);\r
-               \r
-                       var created:String = generateTimestamp(timestamp);\r
-               \r
-                       var password64:String = getBase64Digest(nonce,\r
-                               created,\r
-                               password);\r
-               \r
-                       var token:String = new String("UsernameToken Username=\"");\r
-                       token += username + "\", " +\r
-                                        "PasswordDigest=\"" + password64 + "\", " +\r
-                                        "Nonce=\"" + nonce + "\", " +\r
-                                        "Created=\"" + created + "\"";\r
-                       return token;\r
-               }\r
-               \r
-               private static function generateNonce():String\r
-               {\r
-                       // Math.random returns a Number between 0 and 1.  We don't want our\r
-                       // nonce to contain invalid characters (e.g. the period) so we\r
-                       // strip them out before returning the result.\r
-                       var s:String =  Math.random().toString();\r
-                       return s.replace(".", "");\r
-               }\r
-               \r
-               internal static function base64Encode(s:String):String\r
-               {\r
-                       var encoder:Base64Encoder = new Base64Encoder();\r
-                       encoder.encode(s);\r
-                       return encoder.flush();\r
-               }\r
-               \r
-               internal static function generateTimestamp(timestamp:Date):String\r
-               {\r
-                       if (timestamp == null)\r
-                       {\r
-                               timestamp = new Date();\r
-                       }\r
-                       var dateFormatter:DateFormatter = new DateFormatter();\r
-                       dateFormatter.formatString = "YYYY-MM-DDTJJ:NN:SS"\r
-                       return dateFormatter.format(timestamp) + "Z";\r
-               }\r
-               \r
-               internal static function getBase64Digest(nonce:String, created:String, password:String):String\r
-               {\r
-                       return SHA1.hashToBase64(nonce + created + password);\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/errors/IllegalStateError.as b/com/adobe/errors/IllegalStateError.as
deleted file mode 100644 (file)
index fa16191..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.errors\r
-{\r
-       /**\r
-       * This class represents an Error that is thrown when a method is called when\r
-       * the receiving instance is in an invalid state.\r
-       *\r
-       * For example, this may occur if a method has been called, and other properties\r
-       * in the instance have not been initialized properly.\r
-       *\r
-       * @langversion ActionScript 3.0\r
-       * @playerversion Flash 9.0\r
-       * @tiptext\r
-       *\r
-       */\r
-       public class IllegalStateError extends Error\r
-       {\r
-               /**\r
-               *       Constructor\r
-               *\r
-               *       @param message A message describing the error in detail.\r
-               *\r
-               *       @langversion ActionScript 3.0\r
-               *       @playerversion Flash 9.0\r
-               *       @tiptext\r
-               */\r
-               public function IllegalStateError(message:String)\r
-               {\r
-                       super(message);\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/fileformats/vcard/Address.as b/com/adobe/fileformats/vcard/Address.as
deleted file mode 100644 (file)
index a368ffb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Address
-       {
-               public var type:String;
-               public var street:String;
-               public var city:String;
-               public var state:String;
-               public var postalCode:String;
-               
-               public function toString():String
-               {
-                       return (street + " " + city + ", " + state + " " + postalCode);
-               }
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/fileformats/vcard/Email.as b/com/adobe/fileformats/vcard/Email.as
deleted file mode 100644 (file)
index 071c39e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Email
-       {
-               public var type:String;
-               public var address:String;
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/fileformats/vcard/Phone.as b/com/adobe/fileformats/vcard/Phone.as
deleted file mode 100644 (file)
index 27f98e4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.fileformats.vcard
-{
-       public class Phone
-       {
-               public var type:String;
-               public var number:String;
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/fileformats/vcard/VCard.as b/com/adobe/fileformats/vcard/VCard.as
deleted file mode 100644 (file)
index d6bc283..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.fileformats.vcard
-{
-       import flash.utils.ByteArray;
-
-       public class VCard
-       {
-               public var fullName:String;
-               public var orgs:Array;
-               public var title:String;
-               public var image:ByteArray;
-               public var phones:Array;
-               public var emails:Array;
-               public var addresses:Array;
-               
-               public function VCard()
-               {
-                       orgs = new Array();
-                       phones = new Array();
-                       emails = new Array();
-                       addresses = new Array();
-               }
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/fileformats/vcard/VCardParser.as b/com/adobe/fileformats/vcard/VCardParser.as
deleted file mode 100644 (file)
index 45c954a..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.fileformats.vcard
-{
-       import mx.utils.Base64Decoder;
-       import mx.utils.StringUtil;
-       
-       public class VCardParser
-       {
-               public static function parse(vcardStr:String):Array
-               {
-                       var vcards:Array = new Array();
-                       var lines:Array = vcardStr.split(/\r\n/);
-                       var vcard:VCard;
-                       var type:String;
-                       var typeTmp:String;
-                       var line:String;
-
-                       for (var i:uint = 0; i < lines.length; ++i)
-                       {
-                               line = lines[i];
-                               if (line == "BEGIN:VCARD")
-                               {
-                                       vcard = new VCard();
-                               }
-                               else if (line == "END:VCARD")
-                               {
-                                       if (vcard != null)
-                                       {
-                                               vcards.push(vcard);
-                                       }
-                               }
-                               else if(line.search(/^ORG/i) != -1)
-                               {
-                                       var org:String = line.substring(4, line.length);
-                                       var orgArray:Array = org.split(";");
-                                       for each (var orgToken:String in orgArray)
-                                       {
-                                               if (StringUtil.trim(orgToken).length > 0)
-                                               {
-                                                       vcard.orgs.push(orgToken);
-                                               }
-                                       }
-                               }
-                               else if(line.search(/^TITLE/i) != -1)
-                               {
-                                       var title:String = line.substring(6, line.length);
-                                       vcard.title = title;
-                               }
-                               else if (line.search(/^FN:/i) != -1)
-                               {
-                                       var fullName:String = line.substring(3, line.length);
-                                       vcard.fullName = fullName;
-                               }
-                               else if (line.search(/^TEL/i) != -1)
-                               {
-                                       type = new String();
-                                       typeTmp = new String();
-                                       var phone:Phone = new Phone();
-                                       var number:String;
-                                       var phoneTokens:Array = line.split(";");
-                                       for each (var phoneToken:String in phoneTokens)
-                                       {
-                                               if (phoneToken.search(/^TYPE=/i) != -1)
-                                               {
-                                                       if (phoneToken.indexOf(":") != -1)
-                                                       {
-                                                               typeTmp = phoneToken.substring(5, phoneToken.indexOf(":"));
-                                                               number = phoneToken.substring(phoneToken.indexOf(":")+1, phoneToken.length);
-                                                       }
-                                                       else
-                                                       {                                                                       
-                                                               typeTmp = phoneToken.substring(5, phoneToken.length);
-                                                       }
-
-                                                       typeTmp = typeTmp.toLocaleLowerCase();
-
-                                                       if (typeTmp == "pref")
-                                                       {
-                                                               continue;
-                                                       }
-                                                       if (type.length != 0)
-                                                       {
-                                                               type += (" ");
-                                                       }
-                                                       type += typeTmp;
-                                               }
-                                       }
-                                       if (type.length > 0 && number != null)
-                                       {
-                                               phone.type = type;
-                                               phone.number = number;
-                                       }
-                                       vcard.phones.push(phone);
-                               }
-                               else if (line.search(/^EMAIL/i) != -1)
-                               {
-                                       type = new String();
-                                       typeTmp = new String();
-                                       var email:Email = new Email();
-                                       var emailAddress:String;
-                                       var emailTokens:Array = line.split(";");
-                                       for each (var emailToken:String in emailTokens)
-                                       {
-                                               if (emailToken.search(/^TYPE=/i) != -1)
-                                               {
-                                                       if (emailToken.indexOf(":") != -1)
-                                                       {
-                                                               typeTmp = emailToken.substring(5, emailToken.indexOf(":"));
-                                                               emailAddress = emailToken.substring(emailToken.indexOf(":")+1, emailToken.length);
-                                                       }
-                                                       else
-                                                       {                                                                       
-                                                               typeTmp = emailToken.substring(5, emailToken.length);
-                                                       }
-
-                                                       typeTmp = typeTmp.toLocaleLowerCase();
-
-                                                       if (typeTmp == "pref" || typeTmp == "internet")
-                                                       {
-                                                               continue;
-                                                       }
-                                                       if (type.length != 0)
-                                                       {
-                                                               type += (" ");
-                                                       }
-                                                       type += typeTmp;
-                                               }
-                                       }
-                                       if (type.length > 0 && emailAddress != null)
-                                       {
-                                               email.type = type;
-                                               email.address = emailAddress;
-                                       }
-                                       vcard.emails.push(email);
-                               }
-                               else if (line.indexOf("ADR;") != -1)
-                               {
-                                       var addressTokens:Array = line.split(";");
-                                       var address:Address = new Address();
-                                       for (var j:uint = 0; j < addressTokens.length; ++j)
-                                       {
-                                               var addressToken:String = addressTokens[j];
-                                               if (addressToken.search(/^home:+$/i) != -1) // For Outlook, which uses non-standard vCards.
-                                               {
-                                                       address.type = "home";
-                                               }
-                                               else if (addressToken.search(/^work:+$/i) != -1) // For Outlook, which uses non-standard vCards.
-                                               {
-                                                       address.type = "work";
-                                               }
-                                               if (addressToken.search(/^type=/i) != -1)  // The "type" parameter is the standard way (which Address Book uses)
-                                               {
-                                                       // First, remove the optional ":" character.
-                                                       addressToken = addressToken.replace(/:/,"");
-                                                       var addressType:String = addressToken.substring(5, addressToken.length).toLowerCase();
-                                                       if (addressType == "pref") // Not interested in which one is preferred.
-                                                       {
-                                                               continue;
-                                                       }
-                                                       else if (addressType.indexOf("home") != -1) // home
-                                                       {
-                                                               addressType = "home";
-                                                       }
-                                                       else if (addressType.indexOf("work") != -1) // work
-                                                       {
-                                                               addressType = "work";
-                                                       }
-                                                       else if (addressType.indexOf(",") != -1) // if the comma technique is used, just use the first one
-                                                       {
-                                                               var typeTokens:Array = addressType.split(",");
-                                                               for each (var typeToken:String in typeTokens)
-                                                               {
-                                                                       if (typeToken != "pref")
-                                                                       {
-                                                                               addressType = typeToken;
-                                                                               break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       address.type = addressType;
-                                               }
-                                               else if (addressToken.search(/^\d/) != -1 && address.street == null)
-                                               {
-                                                       address.street = addressToken.replace(/\\n/, "");
-                                                       address.city = addressTokens[j+1];
-                                                       address.state = addressTokens[j+2];
-                                                       address.postalCode = addressTokens[j+3];
-                                               }
-                                       }
-                                       if (address.type != null && address.street != null)
-                                       {
-                                               vcard.addresses.push(address);
-                                       }
-
-                               }
-                               else if (line.search(/^PHOTO;BASE64/i) != -1)
-                               {
-                                       var imageStr:String = new String();
-                                       for (var k:uint = i+1; k < lines.length; ++k)
-                                       {
-                                               imageStr += lines[k];
-                                               //if (lines[k].search(/.+\=$/) != -1) // Very slow in Mac due to RegEx bug
-                                               if (lines[k].indexOf('=') != -1)
-                                               {
-                                                       var decoder:Base64Decoder = new Base64Decoder();
-                                                       decoder.decode(imageStr);
-                                                       vcard.image = decoder.flush();
-                                                       break;
-                                               }
-                                       }
-                               }
-                       }
-                       return vcards;
-               }
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/images/BitString.as b/com/adobe/images/BitString.as
deleted file mode 100644 (file)
index b5c2b84..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       public class BitString\r
-       {\r
-               public var len:int = 0;\r
-               public var val:int = 0;\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/images/JPGEncoder.as b/com/adobe/images/JPGEncoder.as
deleted file mode 100644 (file)
index 100d7e9..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       import flash.geom.*;\r
-       import flash.display.*;\r
-       import flash.utils.*;\r
-       \r
-       /**\r
-        * Class that converts BitmapData into a valid JPEG\r
-        */             \r
-       public class JPGEncoder\r
-       {\r
-\r
-               // Static table initialization\r
-       \r
-               private var ZigZag:Array = [\r
-                        0, 1, 5, 6,14,15,27,28,\r
-                        2, 4, 7,13,16,26,29,42,\r
-                        3, 8,12,17,25,30,41,43,\r
-                        9,11,18,24,31,40,44,53,\r
-                       10,19,23,32,39,45,52,54,\r
-                       20,22,33,38,46,51,55,60,\r
-                       21,34,37,47,50,56,59,61,\r
-                       35,36,48,49,57,58,62,63\r
-               ];\r
-       \r
-               private var YTable:Array = new Array(64);\r
-               private var UVTable:Array = new Array(64);\r
-               private var fdtbl_Y:Array = new Array(64);\r
-               private var fdtbl_UV:Array = new Array(64);\r
-       \r
-               private function initQuantTables(sf:int):void\r
-               {\r
-                       var i:int;\r
-                       var t:Number;\r
-                       var YQT:Array = [\r
-                               16, 11, 10, 16, 24, 40, 51, 61,\r
-                               12, 12, 14, 19, 26, 58, 60, 55,\r
-                               14, 13, 16, 24, 40, 57, 69, 56,\r
-                               14, 17, 22, 29, 51, 87, 80, 62,\r
-                               18, 22, 37, 56, 68,109,103, 77,\r
-                               24, 35, 55, 64, 81,104,113, 92,\r
-                               49, 64, 78, 87,103,121,120,101,\r
-                               72, 92, 95, 98,112,100,103, 99\r
-                       ];\r
-                       for (i = 0; i < 64; i++) {\r
-                               t = Math.floor((YQT[i]*sf+50)/100);\r
-                               if (t < 1) {\r
-                                       t = 1;\r
-                               } else if (t > 255) {\r
-                                       t = 255;\r
-                               }\r
-                               YTable[ZigZag[i]] = t;\r
-                       }\r
-                       var UVQT:Array = [\r
-                               17, 18, 24, 47, 99, 99, 99, 99,\r
-                               18, 21, 26, 66, 99, 99, 99, 99,\r
-                               24, 26, 56, 99, 99, 99, 99, 99,\r
-                               47, 66, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99,\r
-                               99, 99, 99, 99, 99, 99, 99, 99\r
-                       ];\r
-                       for (i = 0; i < 64; i++) {\r
-                               t = Math.floor((UVQT[i]*sf+50)/100);\r
-                               if (t < 1) {\r
-                                       t = 1;\r
-                               } else if (t > 255) {\r
-                                       t = 255;\r
-                               }\r
-                               UVTable[ZigZag[i]] = t;\r
-                       }\r
-                       var aasf:Array = [\r
-                               1.0, 1.387039845, 1.306562965, 1.175875602,\r
-                               1.0, 0.785694958, 0.541196100, 0.275899379\r
-                       ];\r
-                       i = 0;\r
-                       for (var row:int = 0; row < 8; row++)\r
-                       {\r
-                               for (var col:int = 0; col < 8; col++)\r
-                               {\r
-                                       fdtbl_Y[i]  = (1.0 / (YTable [ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
-                                       fdtbl_UV[i] = (1.0 / (UVTable[ZigZag[i]] * aasf[row] * aasf[col] * 8.0));\r
-                                       i++;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               private var YDC_HT:Array;\r
-               private var UVDC_HT:Array;\r
-               private var YAC_HT:Array;\r
-               private var UVAC_HT:Array;\r
-       \r
-               private function computeHuffmanTbl(nrcodes:Array, std_table:Array):Array\r
-               {\r
-                       var codevalue:int = 0;\r
-                       var pos_in_table:int = 0;\r
-                       var HT:Array = new Array();\r
-                       for (var k:int=1; k<=16; k++) {\r
-                               for (var j:int=1; j<=nrcodes[k]; j++) {\r
-                                       HT[std_table[pos_in_table]] = new BitString();\r
-                                       HT[std_table[pos_in_table]].val = codevalue;\r
-                                       HT[std_table[pos_in_table]].len = k;\r
-                                       pos_in_table++;\r
-                                       codevalue++;\r
-                               }\r
-                               codevalue*=2;\r
-                       }\r
-                       return HT;\r
-               }\r
-       \r
-               private var std_dc_luminance_nrcodes:Array = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\r
-               private var std_dc_luminance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
-               private var std_ac_luminance_nrcodes:Array = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\r
-               private var std_ac_luminance_values:Array = [\r
-                       0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\r
-                       0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\r
-                       0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\r
-                       0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\r
-                       0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\r
-                       0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\r
-                       0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\r
-                       0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\r
-                       0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\r
-                       0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\r
-                       0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\r
-                       0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\r
-                       0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\r
-                       0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\r
-                       0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\r
-                       0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\r
-                       0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\r
-                       0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\r
-                       0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\r
-                       0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
-                       0xf9,0xfa\r
-               ];\r
-       \r
-               private var std_dc_chrominance_nrcodes:Array = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\r
-               private var std_dc_chrominance_values:Array = [0,1,2,3,4,5,6,7,8,9,10,11];\r
-               private var std_ac_chrominance_nrcodes:Array = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\r
-               private var std_ac_chrominance_values:Array = [\r
-                       0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\r
-                       0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\r
-                       0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\r
-                       0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\r
-                       0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\r
-                       0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\r
-                       0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\r
-                       0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\r
-                       0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\r
-                       0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\r
-                       0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\r
-                       0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\r
-                       0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\r
-                       0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\r
-                       0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\r
-                       0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\r
-                       0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\r
-                       0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\r
-                       0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\r
-                       0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\r
-                       0xf9,0xfa\r
-               ];\r
-       \r
-               private function initHuffmanTbl():void\r
-               {\r
-                       YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\r
-                       UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\r
-                       YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\r
-                       UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\r
-               }\r
-       \r
-               private var bitcode:Array = new Array(65535);\r
-               private var category:Array = new Array(65535);\r
-       \r
-               private function initCategoryNumber():void\r
-               {\r
-                       var nrlower:int = 1;\r
-                       var nrupper:int = 2;\r
-                       var nr:int;\r
-                       for (var cat:int=1; cat<=15; cat++) {\r
-                               //Positive numbers\r
-                               for (nr=nrlower; nr<nrupper; nr++) {\r
-                                       category[32767+nr] = cat;\r
-                                       bitcode[32767+nr] = new BitString();\r
-                                       bitcode[32767+nr].len = cat;\r
-                                       bitcode[32767+nr].val = nr;\r
-                               }\r
-                               //Negative numbers\r
-                               for (nr=-(nrupper-1); nr<=-nrlower; nr++) {\r
-                                       category[32767+nr] = cat;\r
-                                       bitcode[32767+nr] = new BitString();\r
-                                       bitcode[32767+nr].len = cat;\r
-                                       bitcode[32767+nr].val = nrupper-1+nr;\r
-                               }\r
-                               nrlower <<= 1;\r
-                               nrupper <<= 1;\r
-                       }\r
-               }\r
-       \r
-               // IO functions\r
-       \r
-               private var byteout:ByteArray;\r
-               private var bytenew:int = 0;\r
-               private var bytepos:int = 7;\r
-       \r
-               private function writeBits(bs:BitString):void\r
-               {\r
-                       var value:int = bs.val;\r
-                       var posval:int = bs.len-1;\r
-                       while ( posval >= 0 ) {\r
-                               if (value & uint(1 << posval) ) {\r
-                                       bytenew |= uint(1 << bytepos);\r
-                               }\r
-                               posval--;\r
-                               bytepos--;\r
-                               if (bytepos < 0) {\r
-                                       if (bytenew == 0xFF) {\r
-                                               writeByte(0xFF);\r
-                                               writeByte(0);\r
-                                       }\r
-                                       else {\r
-                                               writeByte(bytenew);\r
-                                       }\r
-                                       bytepos=7;\r
-                                       bytenew=0;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               private function writeByte(value:int):void\r
-               {\r
-                       byteout.writeByte(value);\r
-               }\r
-       \r
-               private function writeWord(value:int):void\r
-               {\r
-                       writeByte((value>>8)&0xFF);\r
-                       writeByte((value   )&0xFF);\r
-               }\r
-       \r
-               // DCT & quantization core\r
-       \r
-               private function fDCTQuant(data:Array, fdtbl:Array):Array\r
-               {\r
-                       var tmp0:Number, tmp1:Number, tmp2:Number, tmp3:Number, tmp4:Number, tmp5:Number, tmp6:Number, tmp7:Number;\r
-                       var tmp10:Number, tmp11:Number, tmp12:Number, tmp13:Number;\r
-                       var z1:Number, z2:Number, z3:Number, z4:Number, z5:Number, z11:Number, z13:Number;\r
-                       var i:int;\r
-                       /* Pass 1: process rows. */\r
-                       var dataOff:int=0;\r
-                       for (i=0; i<8; i++) {\r
-                               tmp0 = data[dataOff+0] + data[dataOff+7];\r
-                               tmp7 = data[dataOff+0] - data[dataOff+7];\r
-                               tmp1 = data[dataOff+1] + data[dataOff+6];\r
-                               tmp6 = data[dataOff+1] - data[dataOff+6];\r
-                               tmp2 = data[dataOff+2] + data[dataOff+5];\r
-                               tmp5 = data[dataOff+2] - data[dataOff+5];\r
-                               tmp3 = data[dataOff+3] + data[dataOff+4];\r
-                               tmp4 = data[dataOff+3] - data[dataOff+4];\r
-       \r
-                               /* Even part */\r
-                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
-                               tmp13 = tmp0 - tmp3;\r
-                               tmp11 = tmp1 + tmp2;\r
-                               tmp12 = tmp1 - tmp2;\r
-       \r
-                               data[dataOff+0] = tmp10 + tmp11; /* phase 3 */\r
-                               data[dataOff+4] = tmp10 - tmp11;\r
-       \r
-                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
-                               data[dataOff+2] = tmp13 + z1; /* phase 5 */\r
-                               data[dataOff+6] = tmp13 - z1;\r
-       \r
-                               /* Odd part */\r
-                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
-                               tmp11 = tmp5 + tmp6;\r
-                               tmp12 = tmp6 + tmp7;\r
-       \r
-                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
-                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
-                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
-                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
-                               z3 = tmp11 * 0.707106781; /* c4 */\r
-       \r
-                               z11 = tmp7 + z3;        /* phase 5 */\r
-                               z13 = tmp7 - z3;\r
-       \r
-                               data[dataOff+5] = z13 + z2;     /* phase 6 */\r
-                               data[dataOff+3] = z13 - z2;\r
-                               data[dataOff+1] = z11 + z4;\r
-                               data[dataOff+7] = z11 - z4;\r
-       \r
-                               dataOff += 8; /* advance pointer to next row */\r
-                       }\r
-       \r
-                       /* Pass 2: process columns. */\r
-                       dataOff = 0;\r
-                       for (i=0; i<8; i++) {\r
-                               tmp0 = data[dataOff+ 0] + data[dataOff+56];\r
-                               tmp7 = data[dataOff+ 0] - data[dataOff+56];\r
-                               tmp1 = data[dataOff+ 8] + data[dataOff+48];\r
-                               tmp6 = data[dataOff+ 8] - data[dataOff+48];\r
-                               tmp2 = data[dataOff+16] + data[dataOff+40];\r
-                               tmp5 = data[dataOff+16] - data[dataOff+40];\r
-                               tmp3 = data[dataOff+24] + data[dataOff+32];\r
-                               tmp4 = data[dataOff+24] - data[dataOff+32];\r
-       \r
-                               /* Even part */\r
-                               tmp10 = tmp0 + tmp3;    /* phase 2 */\r
-                               tmp13 = tmp0 - tmp3;\r
-                               tmp11 = tmp1 + tmp2;\r
-                               tmp12 = tmp1 - tmp2;\r
-       \r
-                               data[dataOff+ 0] = tmp10 + tmp11; /* phase 3 */\r
-                               data[dataOff+32] = tmp10 - tmp11;\r
-       \r
-                               z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\r
-                               data[dataOff+16] = tmp13 + z1; /* phase 5 */\r
-                               data[dataOff+48] = tmp13 - z1;\r
-       \r
-                               /* Odd part */\r
-                               tmp10 = tmp4 + tmp5; /* phase 2 */\r
-                               tmp11 = tmp5 + tmp6;\r
-                               tmp12 = tmp6 + tmp7;\r
-       \r
-                               /* The rotator is modified from fig 4-8 to avoid extra negations. */\r
-                               z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\r
-                               z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\r
-                               z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\r
-                               z3 = tmp11 * 0.707106781; /* c4 */\r
-       \r
-                               z11 = tmp7 + z3;        /* phase 5 */\r
-                               z13 = tmp7 - z3;\r
-       \r
-                               data[dataOff+40] = z13 + z2; /* phase 6 */\r
-                               data[dataOff+24] = z13 - z2;\r
-                               data[dataOff+ 8] = z11 + z4;\r
-                               data[dataOff+56] = z11 - z4;\r
-       \r
-                               dataOff++; /* advance pointer to next column */\r
-                       }\r
-       \r
-                       // Quantize/descale the coefficients\r
-                       for (i=0; i<64; i++) {\r
-                               // Apply the quantization and scaling factor & Round to nearest integer\r
-                               data[i] = Math.round((data[i]*fdtbl[i]));\r
-                       }\r
-                       return data;\r
-               }\r
-       \r
-               // Chunk writing\r
-       \r
-               private function writeAPP0():void\r
-               {\r
-                       writeWord(0xFFE0); // marker\r
-                       writeWord(16); // length\r
-                       writeByte(0x4A); // J\r
-                       writeByte(0x46); // F\r
-                       writeByte(0x49); // I\r
-                       writeByte(0x46); // F\r
-                       writeByte(0); // = "JFIF",'\0'\r
-                       writeByte(1); // versionhi\r
-                       writeByte(1); // versionlo\r
-                       writeByte(0); // xyunits\r
-                       writeWord(1); // xdensity\r
-                       writeWord(1); // ydensity\r
-                       writeByte(0); // thumbnwidth\r
-                       writeByte(0); // thumbnheight\r
-               }\r
-       \r
-               private function writeSOF0(width:int, height:int):void\r
-               {\r
-                       writeWord(0xFFC0); // marker\r
-                       writeWord(17);   // length, truecolor YUV JPG\r
-                       writeByte(8);    // precision\r
-                       writeWord(height);\r
-                       writeWord(width);\r
-                       writeByte(3);    // nrofcomponents\r
-                       writeByte(1);    // IdY\r
-                       writeByte(0x11); // HVY\r
-                       writeByte(0);    // QTY\r
-                       writeByte(2);    // IdU\r
-                       writeByte(0x11); // HVU\r
-                       writeByte(1);    // QTU\r
-                       writeByte(3);    // IdV\r
-                       writeByte(0x11); // HVV\r
-                       writeByte(1);    // QTV\r
-               }\r
-       \r
-               private function writeDQT():void\r
-               {\r
-                       writeWord(0xFFDB); // marker\r
-                       writeWord(132);    // length\r
-                       writeByte(0);\r
-                       var i:int;\r
-                       for (i=0; i<64; i++) {\r
-                               writeByte(YTable[i]);\r
-                       }\r
-                       writeByte(1);\r
-                       for (i=0; i<64; i++) {\r
-                               writeByte(UVTable[i]);\r
-                       }\r
-               }\r
-       \r
-               private function writeDHT():void\r
-               {\r
-                       writeWord(0xFFC4); // marker\r
-                       writeWord(0x01A2); // length\r
-                       var i:int;\r
-       \r
-                       writeByte(0); // HTYDCinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_dc_luminance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=11; i++) {\r
-                               writeByte(std_dc_luminance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(0x10); // HTYACinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_ac_luminance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=161; i++) {\r
-                               writeByte(std_ac_luminance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(1); // HTUDCinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_dc_chrominance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=11; i++) {\r
-                               writeByte(std_dc_chrominance_values[i]);\r
-                       }\r
-       \r
-                       writeByte(0x11); // HTUACinfo\r
-                       for (i=0; i<16; i++) {\r
-                               writeByte(std_ac_chrominance_nrcodes[i+1]);\r
-                       }\r
-                       for (i=0; i<=161; i++) {\r
-                               writeByte(std_ac_chrominance_values[i]);\r
-                       }\r
-               }\r
-       \r
-               private function writeSOS():void\r
-               {\r
-                       writeWord(0xFFDA); // marker\r
-                       writeWord(12); // length\r
-                       writeByte(3); // nrofcomponents\r
-                       writeByte(1); // IdY\r
-                       writeByte(0); // HTY\r
-                       writeByte(2); // IdU\r
-                       writeByte(0x11); // HTU\r
-                       writeByte(3); // IdV\r
-                       writeByte(0x11); // HTV\r
-                       writeByte(0); // Ss\r
-                       writeByte(0x3f); // Se\r
-                       writeByte(0); // Bf\r
-               }\r
-       \r
-               // Core processing\r
-               private var DU:Array = new Array(64);\r
-       \r
-               private function processDU(CDU:Array, fdtbl:Array, DC:Number, HTDC:Array, HTAC:Array):Number\r
-               {\r
-                       var EOB:BitString = HTAC[0x00];\r
-                       var M16zeroes:BitString = HTAC[0xF0];\r
-                       var i:int;\r
-       \r
-                       var DU_DCT:Array = fDCTQuant(CDU, fdtbl);\r
-                       //ZigZag reorder\r
-                       for (i=0;i<64;i++) {\r
-                               DU[ZigZag[i]]=DU_DCT[i];\r
-                       }\r
-                       var Diff:int = DU[0] - DC; DC = DU[0];\r
-                       //Encode DC\r
-                       if (Diff==0) {\r
-                               writeBits(HTDC[0]); // Diff might be 0\r
-                       } else {\r
-                               writeBits(HTDC[category[32767+Diff]]);\r
-                               writeBits(bitcode[32767+Diff]);\r
-                       }\r
-                       //Encode ACs\r
-                       var end0pos:int = 63;\r
-                       for (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {\r
-                       };\r
-                       //end0pos = first element in reverse order !=0\r
-                       if ( end0pos == 0) {\r
-                               writeBits(EOB);\r
-                               return DC;\r
-                       }\r
-                       i = 1;\r
-                       while ( i <= end0pos ) {\r
-                               var startpos:int = i;\r
-                               for (; (DU[i]==0) && (i<=end0pos); i++) {\r
-                               }\r
-                               var nrzeroes:int = i-startpos;\r
-                               if ( nrzeroes >= 16 ) {\r
-                                       for (var nrmarker:int=1; nrmarker <= nrzeroes/16; nrmarker++) {\r
-                                               writeBits(M16zeroes);\r
-                                       }\r
-                                       nrzeroes = int(nrzeroes&0xF);\r
-                               }\r
-                               writeBits(HTAC[nrzeroes*16+category[32767+DU[i]]]);\r
-                               writeBits(bitcode[32767+DU[i]]);\r
-                               i++;\r
-                       }\r
-                       if ( end0pos != 63 ) {\r
-                               writeBits(EOB);\r
-                       }\r
-                       return DC;\r
-               }\r
-       \r
-               private var YDU:Array = new Array(64);\r
-               private var UDU:Array = new Array(64);\r
-               private var VDU:Array = new Array(64);\r
-       \r
-               private function RGB2YUV(img:BitmapData, xpos:int, ypos:int):void\r
-               {\r
-                       var pos:int=0;\r
-                       for (var y:int=0; y<8; y++) {\r
-                               for (var x:int=0; x<8; x++) {\r
-                                       var P:uint = img.getPixel32(xpos+x,ypos+y);\r
-                                       var R:Number = Number((P>>16)&0xFF);\r
-                                       var G:Number = Number((P>> 8)&0xFF);\r
-                                       var B:Number = Number((P    )&0xFF);\r
-                                       YDU[pos]=((( 0.29900)*R+( 0.58700)*G+( 0.11400)*B))-128;\r
-                                       UDU[pos]=(((-0.16874)*R+(-0.33126)*G+( 0.50000)*B));\r
-                                       VDU[pos]=((( 0.50000)*R+(-0.41869)*G+(-0.08131)*B));\r
-                                       pos++;\r
-                               }\r
-                       }\r
-               }\r
-       \r
-               /**\r
-                * Constructor for JPEGEncoder class\r
-                *\r
-                * @param quality The quality level between 1 and 100 that detrmines the\r
-                * level of compression used in the generated JPEG\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */             \r
-               public function JPGEncoder(quality:Number = 50)\r
-               {\r
-                       if (quality <= 0) {\r
-                               quality = 1;\r
-                       }\r
-                       if (quality > 100) {\r
-                               quality = 100;\r
-                       }\r
-                       var sf:int = 0;\r
-                       if (quality < 50) {\r
-                               sf = int(5000 / quality);\r
-                       } else {\r
-                               sf = int(200 - quality*2);\r
-                       }\r
-                       // Create tables\r
-                       initHuffmanTbl();\r
-                       initCategoryNumber();\r
-                       initQuantTables(sf);\r
-               }\r
-       \r
-               /**\r
-                * Created a JPEG image from the specified BitmapData\r
-                *\r
-                * @param image The BitmapData that will be converted into the JPEG format.\r
-                * @return a ByteArray representing the JPEG encoded image data.\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */     \r
-               public function encode(image:BitmapData):ByteArray\r
-               {\r
-                       // Initialize bit writer\r
-                       byteout = new ByteArray();\r
-                       bytenew=0;\r
-                       bytepos=7;\r
-       \r
-                       // Add JPEG headers\r
-                       writeWord(0xFFD8); // SOI\r
-                       writeAPP0();\r
-                       writeDQT();\r
-                       writeSOF0(image.width,image.height);\r
-                       writeDHT();\r
-                       writeSOS();\r
-\r
-       \r
-                       // Encode 8x8 macroblocks\r
-                       var DCY:Number=0;\r
-                       var DCU:Number=0;\r
-                       var DCV:Number=0;\r
-                       bytenew=0;\r
-                       bytepos=7;\r
-                       for (var ypos:int=0; ypos<image.height; ypos+=8) {\r
-                               for (var xpos:int=0; xpos<image.width; xpos+=8) {\r
-                                       RGB2YUV(image, xpos, ypos);\r
-                                       DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\r
-                                       DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\r
-                                       DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\r
-                               }\r
-                       }\r
-       \r
-                       // Do the bit alignment of the EOI marker\r
-                       if ( bytepos >= 0 ) {\r
-                               var fillbits:BitString = new BitString();\r
-                               fillbits.len = bytepos+1;\r
-                               fillbits.val = (1<<(bytepos+1))-1;\r
-                               writeBits(fillbits);\r
-                       }\r
-       \r
-                       writeWord(0xFFD9); //EOI\r
-                       return byteout;\r
-               }\r
-       }\r
-}\r
diff --git a/com/adobe/images/PNGEncoder.as b/com/adobe/images/PNGEncoder.as
deleted file mode 100644 (file)
index 83c95f6..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-package com.adobe.images\r
-{\r
-       import flash.geom.*;\r
-       import flash.display.Bitmap;\r
-       import flash.display.BitmapData;\r
-       import flash.utils.ByteArray;\r
-\r
-       /**\r
-        * Class that converts BitmapData into a valid PNG\r
-        */     \r
-       public class PNGEncoder\r
-       {\r
-               /**\r
-                * Created a PNG image from the specified BitmapData\r
-                *\r
-                * @param image The BitmapData that will be converted into the PNG format.\r
-                * @return a ByteArray representing the PNG encoded image data.\r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                * @tiptext\r
-                */                     \r
-           public static function encode(img:BitmapData):ByteArray {\r
-               // Create output byte array\r
-               var png:ByteArray = new ByteArray();\r
-               // Write PNG signature\r
-               png.writeUnsignedInt(0x89504e47);\r
-               png.writeUnsignedInt(0x0D0A1A0A);\r
-               // Build IHDR chunk\r
-               var IHDR:ByteArray = new ByteArray();\r
-               IHDR.writeInt(img.width);\r
-               IHDR.writeInt(img.height);\r
-               IHDR.writeUnsignedInt(0x08060000); // 32bit RGBA\r
-               IHDR.writeByte(0);\r
-               writeChunk(png,0x49484452,IHDR);\r
-               // Build IDAT chunk\r
-               var IDAT:ByteArray= new ByteArray();\r
-               for(var i:int=0;i < img.height;i++) {\r
-                   // no filter\r
-                   IDAT.writeByte(0);\r
-                   var p:uint;\r
-                   var j:int;\r
-                   if ( !img.transparent ) {\r
-                       for(j=0;j < img.width;j++) {\r
-                           p = img.getPixel(j,i);\r
-                           IDAT.writeUnsignedInt(\r
-                               uint(((p&0xFFFFFF) << 8)|0xFF));\r
-                       }\r
-                   } else {\r
-                       for(j=0;j < img.width;j++) {\r
-                           p = img.getPixel32(j,i);\r
-                           IDAT.writeUnsignedInt(\r
-                               uint(((p&0xFFFFFF) << 8)|\r
-                               (p>>>24)));\r
-                       }\r
-                   }\r
-               }\r
-               IDAT.compress();\r
-               writeChunk(png,0x49444154,IDAT);\r
-               // Build IEND chunk\r
-               writeChunk(png,0x49454E44,null);\r
-               // return PNG\r
-               return png;\r
-           }\r
-       \r
-           private static var crcTable:Array;\r
-           private static var crcTableComputed:Boolean = false;\r
-       \r
-           private static function writeChunk(png:ByteArray, \r
-                   type:uint, data:ByteArray):void {\r
-               if (!crcTableComputed) {\r
-                   crcTableComputed = true;\r
-                   crcTable = [];\r
-                   var c:uint;\r
-                   for (var n:uint = 0; n < 256; n++) {\r
-                       c = n;\r
-                       for (var k:uint = 0; k < 8; k++) {\r
-                           if (c & 1) {\r
-                               c = uint(uint(0xedb88320) ^ \r
-                                   uint(c >>> 1));\r
-                           } else {\r
-                               c = uint(c >>> 1);\r
-                           }\r
-                       }\r
-                       crcTable[n] = c;\r
-                   }\r
-               }\r
-               var len:uint = 0;\r
-               if (data != null) {\r
-                   len = data.length;\r
-               }\r
-               png.writeUnsignedInt(len);\r
-               var p:uint = png.position;\r
-               png.writeUnsignedInt(type);\r
-               if ( data != null ) {\r
-                   png.writeBytes(data);\r
-               }\r
-               var e:uint = png.position;\r
-               png.position = p;\r
-               c = 0xffffffff;\r
-               for (var i:int = 0; i < (e-p); i++) {\r
-                   c = uint(crcTable[\r
-                       (c ^ png.readUnsignedByte()) & \r
-                       uint(0xff)] ^ uint(c >>> 8));\r
-               }\r
-               c = uint(c^uint(0xffffffff));\r
-               png.position = e;\r
-               png.writeUnsignedInt(c);\r
-           }\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/net/DynamicURLLoader.as b/com/adobe/net/DynamicURLLoader.as
deleted file mode 100644 (file)
index 2a9eea1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       import flash.net.URLLoader;\r
-\r
-       /**\r
-       *       Class that provides a dynamic implimentation of the URLLoader class.\r
-       * \r
-       *       This class provides no API implimentations. However, since the class is\r
-       *       declared as dynamic, it can be used in place of URLLoader, and allow\r
-       *       you to dynamically attach properties to it (which URLLoader does not allow).\r
-       * \r
-       *       @langversion ActionScript 3.0\r
-       *       @playerversion Flash 9.0\r
-       *       @tiptext\r
-       */      \r
-       public dynamic class DynamicURLLoader extends URLLoader \r
-       {\r
-               public function DynamicURLLoader()\r
-               {\r
-                       super();\r
-               }\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/net/IURIResolver.as b/com/adobe/net/IURIResolver.as
deleted file mode 100644 (file)
index 3610cc2..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       /**\r
-        * The URI class cannot know about DNS aliases, virtual hosts, or\r
-        * symbolic links that may be involved.  The application can provide\r
-        * an implementation of this interface to resolve the URI before the\r
-        * URI class makes any comparisons.  For example, a web host has\r
-        * two aliases:\r
-        * \r
-        * <p><code>\r
-        *    http://www.site.com/\r
-        *    http://www.site.net/\r
-        * </code></p>\r
-        * \r
-        * <p>The application can provide an implementation that automatically\r
-        * resolves site.net to site.com before URI compares two URI objects.\r
-        * Only the application can know and understand the context in which\r
-        * the URI's are being used.</p>\r
-        * \r
-        * <p>Use the URI.resolver accessor to assign a custom resolver to\r
-        * the URI class.  Any resolver specified is global to all instances\r
-        * of URI.</p>\r
-        * \r
-        * <p>URI will call this before performing URI comparisons in the\r
-        * URI.getRelation() and URI.getCommonParent() functions.\r
-        * \r
-        * @see URI.getRelation\r
-        * @see URI.getCommonParent\r
-        * \r
-        * @langversion ActionScript 3.0\r
-        * @playerversion Flash 9.0\r
-        */\r
-       public interface IURIResolver\r
-       {\r
-               /**\r
-                * Implement this method to provide custom URI resolution for\r
-                * your application.\r
-                * \r
-                * @langversion ActionScript 3.0\r
-                * @playerversion Flash 9.0\r
-                */\r
-               function resolve(uri:URI) : URI;\r
-       }\r
-}
\ No newline at end of file
diff --git a/com/adobe/net/MimeTypeMap.as b/com/adobe/net/MimeTypeMap.as
deleted file mode 100644 (file)
index 32e40a4..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
-  Copyright (c) 2008, Adobe Systems Incorporated
-  All rights reserved.
-
-  Redistribution and use in source and binary forms, with or without 
-  modification, are permitted provided that the following conditions are
-  met:
-
-  * Redistributions of source code must retain the above copyright notice, 
-    this list of conditions and the following disclaimer.
-  
-  * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in the 
-    documentation and/or other materials provided with the distribution.
-  
-  * Neither the name of Adobe Systems Incorporated nor the names of its 
-    contributors may be used to endorse or promote products derived from 
-    this software without specific prior written permission.
-
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-package com.adobe.net
-{
-       public class MimeTypeMap
-       {
-               private var types:Array = 
-                       [["application/andrew-inset","ez"],
-                       ["application/atom+xml","atom"],
-                       ["application/mac-binhex40","hqx"],
-                       ["application/mac-compactpro","cpt"],
-                       ["application/mathml+xml","mathml"],
-                       ["application/msword","doc"],
-                       ["application/octet-stream","bin","dms","lha","lzh","exe","class","so","dll","dmg"],
-                       ["application/oda","oda"],
-                       ["application/ogg","ogg"],
-                       ["application/pdf","pdf"],
-                       ["application/postscript","ai","eps","ps"],
-                       ["application/rdf+xml","rdf"],
-                       ["application/smil","smi","smil"],
-                       ["application/srgs","gram"],
-                       ["application/srgs+xml","grxml"],
-                       ["application/vnd.adobe.apollo-application-installer-package+zip","air"],
-                       ["application/vnd.mif","mif"],
-                       ["application/vnd.mozilla.xul+xml","xul"],
-                       ["application/vnd.ms-excel","xls"],
-                       ["application/vnd.ms-powerpoint","ppt"],
-                       ["application/vnd.rn-realmedia","rm"],
-                       ["application/vnd.wap.wbxml","wbxml"],
-                       ["application/vnd.wap.wmlc","wmlc"],
-                       ["application/vnd.wap.wmlscriptc","wmlsc"],
-                       ["application/voicexml+xml","vxml"],
-                       ["application/x-bcpio","bcpio"],
-                       ["application/x-cdlink","vcd"],
-                       ["application/x-chess-pgn","pgn"],
-                       ["application/x-cpio","cpio"],
-                       ["application/x-csh","csh"],
-                       ["application/x-director","dcr","dir","dxr"],
-                       ["application/x-dvi","dvi"],
-                       ["application/x-futuresplash","spl"],
-                       ["application/x-gtar","gtar"],
-                       ["application/x-hdf","hdf"],
-                       ["application/x-javascript","js"],
-                       ["application/x-koan","skp","skd","skt","skm"],
-                       ["application/x-latex","latex"],
-                       ["application/x-netcdf","nc","cdf"],
-                       ["application/x-sh","sh"],
-                       ["application/x-shar","shar"],
-                       ["application/x-shockwave-flash","swf"],
-                       ["application/x-stuffit","sit"],
-                       ["application/x-sv4cpio","sv4cpio"],
-                       ["application/x-sv4crc","sv4crc"],
-                       ["application/x-tar","tar"],
-                       ["application/x-tcl","tcl"],
-                       ["application/x-tex","tex"],
-                       ["application/x-texinfo","texinfo","texi"],
-                       ["application/x-troff","t","tr","roff"],
-                       ["application/x-troff-man","man"],
-                       ["application/x-troff-me","me"],
-                       ["application/x-troff-ms","ms"],
-                       ["application/x-ustar","ustar"],
-                       ["application/x-wais-source","src"],
-                       ["application/xhtml+xml","xhtml","xht"],
-                       ["application/xml","xml","xsl"],
-                       ["application/xml-dtd","dtd"],
-                       ["application/xslt+xml","xslt"],
-                       ["application/zip","zip"],
-                       ["audio/basic","au","snd"],
-                       ["audio/midi","mid","midi","kar"],
-                       ["audio/mpeg","mp3","mpga","mp2"],
-                       ["audio/x-aiff","aif","aiff","aifc"],
-                       ["audio/x-mpegurl","m3u"],
-                       ["audio/x-pn-realaudio","ram","ra"],
-                       ["audio/x-wav","wav"],
-                       ["chemical/x-pdb","pdb"],
-                       ["chemical/x-xyz","xyz"],
-                       ["image/bmp","bmp"],
-                       ["image/cgm","cgm"],
-                       ["image/gif","gif"],
-                       ["image/ief","ief"],
-                       ["image/jpeg","jpg","jpeg","jpe"],
-                       ["image/png","png"],
-                       ["image/svg+xml","svg"],
-                       ["image/tiff","tiff","tif"],
-                       ["image/vnd.djvu","djvu","djv"],
-                       ["image/vnd.wap.wbmp","wbmp"],
-                       ["image/x-cmu-raster","ras"],
-                       ["image/x-icon","ico"],
-                       ["image/x-portable-anymap","pnm"],
-                       ["image/x-portable-bitmap","pbm"],
-                       ["image/x-portable-graymap","pgm"],
-                       ["image/x-portable-pixmap","ppm"],
-                       ["image/x-rgb","rgb"],
-                       ["image/x-xbitmap","xbm"],
-                       ["image/x-xpixmap","xpm"],
-                       ["image/x-xwindowdump","xwd"],
-                       ["model/iges","igs","iges"],
-                       ["model/mesh","msh","mesh","silo"],
-                       ["model/vrml","wrl","vrml"],
-                       ["text/calendar","ics","ifb"],
-                       ["text/css","css"],
-                       ["text/html","html","htm"],
-                       ["text/plain","txt","asc"],
-                       ["text/richtext","rtx"],
-                       ["text/rtf","rtf"],
-                       ["text/sgml","sgml","sgm"],
-                       ["text/tab-separated-values","tsv"],
-                       ["text/vnd.wap.wml","wml"],
-                       ["text/vnd.wap.wmlscript","wmls"],
-                       ["text/x-setext","etx"],
-                       ["video/mpeg","mpg","mpeg","mpe"],
-                       ["video/quicktime","mov","qt"],
-                       ["video/vnd.mpegurl","m4u","mxu"],
-                       ["video/x-flv","flv"],
-                       ["video/x-msvideo","avi"],
-                       ["video/x-sgi-movie","movie"],
-                       ["x-conference/x-cooltalk","ice"]];
-               
-               /**
-                * Returns the mimetype for the given extension.
-                */
-               public function getMimeType(extension:String):String
-               {
-                       extension = extension.toLocaleLowerCase();
-                       for each (var a:Array in types)
-                       {
-                               for each (var b:String in a)
-                               {
-                                       if (b == extension)
-                                       {
-                                               return a[0];
-                                       }
-                               }
-                       }
-                       return null;
-               }
-
-               /**
-                * Returns the prefered extension for the given mimetype.
-                */
-               public function getExtension(mimetype:String):String
-               {
-                       mimetype = mimetype.toLocaleLowerCase();
-                       for each (var a:Array in types)
-                       {
-                               if (a[0] == mimetype)
-                               {
-                                       return a[1];
-                               }
-                       }
-                       return null;
-               }
-
-               /**
-                * Adds a mimetype to the map. The order of the extensions matters. The most preferred should come first.
-                */
-               public function addMimeType(mimetype:String, extensions:Array):void
-               {
-                       var newType:Array = [mimetype];
-                       for each (var a:String in extensions)
-                       {
-                               newType.push(a);
-                       }
-                       types.push(newType);
-               }
-       }
-}
\ No newline at end of file
diff --git a/com/adobe/net/URI.as b/com/adobe/net/URI.as
deleted file mode 100644 (file)
index d43ce9f..0000000
+++ /dev/null
@@ -1,2466 +0,0 @@
-/*\r
-  Copyright (c) 2008, Adobe Systems Incorporated\r
-  All rights reserved.\r
-\r
-  Redistribution and use in source and binary forms, with or without \r
-  modification, are permitted provided that the following conditions are\r
-  met:\r
-\r
-  * Redistributions of source code must retain the above copyright notice, \r
-    this list of conditions and the following disclaimer.\r
-  \r
-  * Redistributions in binary form must reproduce the above copyright\r
-    notice, this list of conditions and the following disclaimer in the \r
-    documentation and/or other materials provided with the distribution.\r
-  \r
-  * Neither the name of Adobe Systems Incorporated nor the names of its \r
-    contributors may be used to endorse or promote products derived from \r
-    this software without specific prior written permission.\r
-\r
-  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS\r
-  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
-  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
-  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \r
-  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
-  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
-  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r
-  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r
-  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
-  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r
-  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
-*/\r
-\r
-package com.adobe.net\r
-{\r
-       import flash.utils.ByteArray;\r
-       \r
-       /**\r
-        * This class implements functions and utilities for working with URI's\r
-        * (Universal Resource Identifiers).  For technical description of the\r
-        * URI syntax, please see RFC 3986 at http://www.ietf.org/rfc/rfc3986.txt\r
-        * or do a web search for "rfc 3986".\r
-        * \r
-        * <p>The most important aspect of URI's to understand is that URI's\r
-        * and URL's are not strings.  URI's are complex data structures that\r
-        * encapsulate many pieces of information.  The string version of a\r
-        * URI is the serialized representation of that data structure.  This\r
-        * string serialization is used to provide a human readable\r
-        * representation and a means to transport the data over the network\r
-        * where it can then be parsed back into its' component parts.</p>\r
-        * \r
-        * <p>URI's fall into one of three categories:\r
-        * <ul>\r
-        *  <li>&lt;scheme&gt;:&lt;scheme-specific-part&gt;#&lt;fragment&gt;            (non-hierarchical)</li>\r
-        *  <li>&lt;scheme&gt;:<authority&gt;&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;        (hierarchical)</li>\r
-        *  <li>&lt;path&gt;?&lt;query&gt;#&lt;fragment&gt;                                             (relative hierarchical)</li>\r
-        * </ul></p>\r
-        * \r
-        * <p>The query and fragment parts are optional.</p>\r
-        * \r
-        * <p>This class supports both non-hierarchical and hierarchical URI's</p>\r
-        * \r
-        * <p>This class is intended to be used "as-is" for the vast majority\r
-        * of common URI's.  However, if your application requires a custom\r
-        * URI syntax (e.g. custom query syntax or special handling of\r
-        * non-hierarchical URI's), this class can be fully subclassed.  If you\r
-        * intended to subclass URI, please see the source code for complete\r
-        * documation on protected members and protected fuctions.</p>\r
-        * \r
-        * @langversion ActionScript 3.0\r
-        * @playerversion Flash 9.0 \r
-        */\r
-       public class URI\r
-       {       \r
-               // Here we define which characters must be escaped for each\r
-               // URI part.  The characters that must be escaped for each\r
-               // part differ depending on what would cause ambiguous parsing.\r
-               // RFC 3986 sec. 2.4 states that characters should only be\r
-               // encoded when they would conflict with subcomponent delimiters.\r
-               // We don't want to over-do the escaping.  We only want to escape\r
-               // the minimum needed to prevent parsing problems.\r
-               \r
-               // space and % must be escaped in all cases.  '%' is the delimiter\r
-               // for escaped characters.\r
-               public static const URImustEscape:String =      " %";\r
-               \r
-               // Baseline of what characters must be escaped\r
-               public static const URIbaselineEscape:String = URImustEscape + ":?#/@";\r
-               \r
-               // Characters that must be escaped in the part part.\r
-               public static const URIpathEscape:String = URImustEscape + "?#";\r
-               \r
-               // Characters that must be escaped in the query part, if setting\r
-               // the query as a whole string.  If the query is set by\r
-               // name/value, URIqueryPartEscape is used instead.\r
-               public static const URIqueryEscape:String = URImustEscape + "#";\r
-               \r
-               // This is what each name/value pair must escape "&=" as well\r
-               // so they don't conflict with the "param=value&param2=value2"\r
-               // syntax.\r
-               public static const URIqueryPartEscape:String = URImustEscape + "#&=";\r
-               \r
-               // Non-hierarchical URI's can have query and fragment parts, but\r
-               // we also want to prevent '/' otherwise it might end up looking\r
-               // like a hierarchical URI to the parser.\r
-               public static const URInonHierEscape:String =   URImustEscape + "?#/";\r
-               \r
-               // Baseline uninitialized setting for the URI scheme.\r
-               public static const UNKNOWN_SCHEME:String = "unknown";\r
-               \r
-               // The following bitmaps are used for performance enhanced\r
-               // character escaping.\r
-               \r
-               // Baseline characters that need to be escaped.  Many parts use\r
-               // this.\r
-               protected static const URIbaselineExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIbaselineEscape);\r
-               \r
-               // Scheme escaping bitmap\r
-               protected static const URIschemeExcludedBitmap:URIEncodingBitmap = \r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // User/pass escaping bitmap\r
-               protected static const URIuserpassExcludedBitmap:URIEncodingBitmap =\r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // Authority escaping bitmap\r
-               protected static const URIauthorityExcludedBitmap:URIEncodingBitmap =\r
-                       URIbaselineExcludedBitmap;\r
-                       \r
-               // Port escaping bitmap\r
-               protected static const URIportExludedBitmap:URIEncodingBitmap = \r
-                       URIbaselineExcludedBitmap;\r
-               \r
-               // Path escaping bitmap\r
-               protected static const URIpathExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIpathEscape);\r
-                       \r
-               // Query (whole) escaping bitmap\r
-               protected static const URIqueryExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIqueryEscape);\r
-                       \r
-               // Query (individual parts) escaping bitmap\r
-               protected static const URIqueryPartExcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URIqueryPartEscape);\r
-                       \r
-               // Fragments are the last part in the URI.  They only need to\r
-               // escape space, '#', and '%'.  Turns out that is what query\r
-               // uses too.\r
-               protected static const URIfragmentExcludedBitmap:URIEncodingBitmap =\r
-                       URIqueryExcludedBitmap;\r
-                       \r
-               // Characters that need to be escaped in the non-hierarchical part\r
-               protected static const URInonHierexcludedBitmap:URIEncodingBitmap =\r
-                       new URIEncodingBitmap(URInonHierEscape);\r
-                       \r
-               // Values used by getRelation()\r
-               public static const NOT_RELATED:int = 0;\r
-               public static const CHILD:int = 1;\r
-               public static const EQUAL:int = 2;\r
-               public static const PARENT:int = 3;\r
-\r
-               //-------------------------------------------------------------------\r
-               // protected class members\r
-               //-------------------------------------------------------------------\r
-               protected var _valid:Boolean = false;\r
-               protected var _relative:Boolean = false;\r
-               protected var _scheme:String = "";\r
-               protected var _authority:String = "";\r
-               protected var _username:String = "";\r
-               protected var _password:String = "";\r
-               protected var _port:String = "";\r
-               protected var _path:String = "";\r
-               protected var _query:String = "";\r
-               protected var _fragment:String = "";\r
-               protected var _nonHierarchical:String = "";\r
-               protected static var _resolver:IURIResolver = null;\r
-\r
-\r
-               /**\r
-                *  URI Constructor.  If no string is given, this will initialize\r
-                *  this URI object to a blank URI.\r
-                */\r
-               public function URI(uri:String = null) : void   \r
-               {\r
-                       if (uri == null)\r
-                               initialize();\r
-                       else\r
-                               constructURI(uri);\r
-               }\r
-\r
-               \r
-               /**\r
-                * @private\r
-                * Method that loads the URI from the given string.\r
-                */\r
-               protected function constructURI(uri:String) : Boolean\r
-               {\r
-                       if (!parseURI(uri))\r
-                               _valid = false;\r
-                               \r
-                       return isValid();\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private Private initializiation.\r
-                */\r
-               protected function initialize() : void\r
-               {\r
-                       _valid = false;\r
-                       _relative = false;\r
-               \r
-                       _scheme = UNKNOWN_SCHEME;\r
-                       _authority = "";\r
-                       _username = "";\r
-                       _password = "";\r
-                       _port = "";\r
-                       _path = "";\r
-                       _query = "";\r
-                       _fragment = "";\r
-               \r
-                       _nonHierarchical = "";\r
-               }       \r
-               \r
-               /**\r
-                * @private Accessor to explicitly set/get the hierarchical\r
-                * state of the URI.\r
-                */\r
-               protected function set hierState(state:Boolean) : void\r
-               {\r
-                       if (state)\r
-                       {\r
-                               // Clear the non-hierarchical data\r
-                               _nonHierarchical = "";\r
-               \r
-                               // Also set the state vars while we are at it\r
-                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
-                                       _relative = true;\r
-                               else\r
-                                       _relative = false;\r
-               \r
-                               if (_authority.length == 0 && _path.length == 0)\r
-                                       _valid = false;\r
-                               else\r
-                                       _valid = true;\r
-                       }\r
-                       else\r
-                       {\r
-                               // Clear the hierarchical data\r
-                               _authority = "";\r
-                               _username = "";\r
-                               _password = "";\r
-                               _port = "";\r
-                               _path = "";\r
-               \r
-                               _relative = false;\r
-               \r
-                               if (_scheme == "" || _scheme == UNKNOWN_SCHEME)\r
-                                       _valid = false;\r
-                               else\r
-                                       _valid = true;\r
-                       }\r
-               }\r
-               protected function get hierState() : Boolean\r
-               {\r
-                       return (_nonHierarchical.length == 0);\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private Functions that performs some basic consistency validation.\r
-                */\r
-               protected function validateURI() : Boolean\r
-               {\r
-                       // Check the scheme\r
-                       if (isAbsolute())\r
-                       {\r
-                               if (_scheme.length <= 1 || _scheme == UNKNOWN_SCHEME)\r
-                               {\r
-                                       // we probably parsed a C:\ type path or no scheme\r
-                                       return false;\r
-                               }\r
-                               else if (verifyAlpha(_scheme) == false)\r
-                                       return false;  // Scheme contains bad characters\r
-                       }\r
-                       \r
-                       if (hierState)\r
-                       {\r
-                               if (_path.search('\\') != -1)\r
-                                       return false;  // local path\r
-                               else if (isRelative() == false && _scheme == UNKNOWN_SCHEME)\r
-                                       return false;  // It's an absolute URI, but it has a bad scheme\r
-                       }\r
-                       else\r
-                       {\r
-                               if (_nonHierarchical.search('\\') != -1)\r
-                                       return false;  // some kind of local path\r
-                       }\r
-               \r
-                       // Looks like it's ok.\r
-                       return true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                *\r
-                * Given a URI in string format, parse that sucker into its basic\r
-                * components and assign them to this object.  A URI is of the form:\r
-                *    <scheme>:<authority><path>?<query>#<fragment>\r
-                *\r
-                * For simplicity, we parse the URI in the following order:\r
-                *              \r
-                *              1. Fragment (anchors)\r
-                *              2. Query        (CGI stuff)\r
-                *              3. Scheme       ("http")\r
-                *              4. Authority (host name)\r
-                *              5. Username/Password (if any)\r
-                *              6. Port         (server port if any)\r
-                *              7. Path         (/homepages/mypage.html)\r
-                *\r
-                * The reason for this order is to minimize any parsing ambiguities.\r
-                * Fragments and queries can contain almost anything (they are parts\r
-                * that can contain custom data with their own syntax).  Parsing\r
-                * them out first removes a large chance of parsing errors.  This\r
-                * method expects well formed URI's, but performing the parse in\r
-                * this order makes us a little more tolerant of user error.\r
-                * \r
-                * REGEXP\r
-                * Why doesn't this use regular expressions to parse the URI?  We\r
-                * have found that in a real world scenario, URI's are not always\r
-                * well formed.  Sometimes characters that should have been escaped\r
-                * are not, and those situations would break a regexp pattern.  This\r
-                * function attempts to be smart about what it is parsing based on\r
-                * location of characters relative to eachother.  This function has\r
-                * been proven through real-world use to parse the vast majority\r
-                * of URI's correctly.\r
-                *\r
-                * NOTE\r
-                * It is assumed that the string in URI form is escaped.  This function\r
-                * does not escape anything.  If you constructed the URI string by\r
-                * hand, and used this to parse in the URI and still need it escaped,\r
-                * call forceEscape() on your URI object.\r
-                *\r
-                * Parsing Assumptions\r
-                * This routine assumes that the URI being passed is well formed.\r
-                * Passing things like local paths, malformed URI's, and the such\r
-                * will result in parsing errors.  This function can handle\r
-                *       - absolute hierarchical (e.g. "http://something.com/index.html),\r
-                *   - relative hierarchical (e.g. "../images/flower.gif"), or\r
-                *   - non-hierarchical URIs (e.g. "mailto:jsmith@fungoo.com").\r
-                * \r
-                * Anything else will probably result in a parsing error, or a bogus\r
-                * URI object.\r
-                * \r
-                * Note that non-hierarchical URIs *MUST* have a scheme, otherwise\r
-                * they will be mistaken for relative URI's.\r
-                * \r
-                * If you are not sure what is being passed to you (like manually\r
-                * entered text from UI), you can construct a blank URI object and\r
-                * call unknownToURI() passing in the unknown string.\r
-                * \r
-                * @return      true if successful, false if there was some kind of\r
-                * parsing error\r
-                */\r
-               protected function parseURI(uri:String) : Boolean\r
-               {\r
-                       var baseURI:String = uri;\r
-                       var index:int, index2:int;\r
-               \r
-                       // Make sure this object is clean before we start.  If it was used\r
-                       // before and we are now parsing a new URI, we don't want any stale\r
-                       // info lying around.\r
-                       initialize();\r
-               \r
-                       // Remove any fragments (anchors) from the URI\r
-                       index = baseURI.indexOf("#");\r
-                       if (index != -1)\r
-                       {\r
-                               // Store the fragment piece if any\r
-                               if (baseURI.length > (index + 1)) // +1 is to skip the '#'\r
-                                       _fragment = baseURI.substr(index + 1, baseURI.length - (index + 1)); \r
-               \r
-                               // Trim off the fragment\r
-                               baseURI = baseURI.substr(0, index);\r
-                       }\r
-               \r
-                       // We need to strip off any CGI parameters (eg '?param=bob')\r
-                       index = baseURI.indexOf("?");\r
-                       if (index != -1)\r
-                       {\r
-                               if (baseURI.length > (index + 1))\r
-                                       _query = baseURI.substr(index + 1, baseURI.length - (index + 1)); // +1 is to skip the '?'\r
-               \r
-                               // Trim off the query\r
-                               baseURI = baseURI.substr(0, index);\r
-                       }\r
-               \r
-                       // Now try to find the scheme part\r
-                       index = baseURI.search(':');\r
-                       index2 = baseURI.search('/');\r
-               \r
-                       var containsColon:Boolean = (index != -1);\r
-                       var containsSlash:Boolean = (index2 != -1);\r
-               \r
-                       // This value is indeterminate if "containsColon" is false.\r
-                       // (if there is no colon, does the slash come before or\r
-                       // after said non-existing colon?)\r
-                       var colonBeforeSlash:Boolean = (!containsSlash || index < index2);\r
-               \r
-                       // If it has a colon and it's before the first slash, we will treat\r
-                       // it as a scheme.  If a slash is before a colon, there must be a\r
-                       // stray colon in a path or something.  In which case, the colon is\r
-                       // not the separator for the scheme.  Technically, we could consider\r
-                       // this an error, but since this is not an ambiguous state (we know\r
-                       // 100% that this has no scheme), we will keep going.\r
-                       if (containsColon && colonBeforeSlash)\r
-                       {\r
-                               // We found a scheme\r
-                               _scheme = baseURI.substr(0, index);\r
-                               \r
-                               // Normalize the scheme\r
-                               _scheme = _scheme.toLowerCase();\r
-               \r
-                               baseURI = baseURI.substr(index + 1);\r
-               \r
-                               if (baseURI.substr(0, 2) == "//")\r
-                               {\r
-                                       // This is a hierarchical URI\r
-                                       _nonHierarchical = "";\r
-               \r
-                                       // Trim off the "//"\r
-                                       baseURI = baseURI.substr(2, baseURI.length - 2);\r
-                               }\r
-                               else\r
-                               {\r
-                                       // This is a non-hierarchical URI like "mailto:bob@mail.com"\r
-                                       _nonHierarchical = baseURI;\r
-               \r
-                                       if ((_valid = validateURI()) == false)\r
-                                               initialize();  // Bad URI.  Clear it.\r
-               \r
-                                       // No more parsing to do for this case\r
-                                       return isValid();\r
-                               }\r
-                       }\r
-                       else\r
-                       {\r
-                               // No scheme.  We will consider this a relative URI\r
-                               _scheme = "";\r
-                               _relative = true;\r
-                               _nonHierarchical = "";\r
-                       }\r
-               \r
-                       // Ok, what we have left is everything after the <scheme>://\r
-               \r
-                       // Now that we have stripped off any query and fragment parts, we\r
-                       // need to split the authority from the path\r
-               \r
-                       if (isRelative())\r
-                       {\r
-                               // Don't bother looking for the authority.  It's a relative URI\r
-                               _authority = "";\r
-                               _port = "";\r
-                               _path = baseURI;\r
-                       }\r
-                       else\r
-                       {\r
-                               // Check for malformed UNC style file://///server/type/path/\r
-                               // By the time we get here, we have already trimmed the "file://"\r
-                               // so baseURI will be ///server/type/path.  If baseURI only\r
-                               // has one slash, we leave it alone because that is valid (that\r
-                               // is the case of "file:///path/to/file.txt" where there is no\r
-                               // server - implicit "localhost").\r
-                               if (baseURI.substr(0, 2) == "//")\r
-                               {\r
-                                       // Trim all leading slashes\r
-                                       while(baseURI.charAt(0) == "/")\r
-                                               baseURI = baseURI.substr(1, baseURI.length - 1);\r
-                               }\r
-               \r
-                               index = baseURI.search('/');\r
-                               if (index == -1)\r
-                               {\r
-                                       // No path.  We must have passed something like "http://something.com"\r
-                                       _authority = baseURI;\r
-                                       _path = "";\r
-                               }\r
-                               else\r
-                               {\r
-                                       _authority = baseURI.substr(0, index);\r
-                                       _path = baseURI.substr(index, baseURI.length - index);\r
-                               }\r
-               \r
-                               // Check to see if the URI has any username or password information.\r
-                               // For example:  ftp://username:password@server.com\r
-                               index = _authority.search('@');\r
-                               if (index != -1)\r
-                               {\r
-                                       // We have a username and possibly a password\r
-                                       _username = _authority.substr(0, index);\r
-               \r
-                                       // Remove the username/password from the authority\r
-                                       _authority = _authority.substr(index + 1);  // Skip the '@'\r
-               \r
-                                       // Now check to see if the username also has a password\r
-                                       index = _username.search(':');\r
-                                       if (index != -1)\r
-                                       {\r
-                                               _password = _username.substring(index + 1, _username.length);\r
-                                               _username = _username.substr(0, index);\r
-                                       }\r
-                                       else\r
-                                               _password = "";\r
-                               }\r
-                               else\r
-                               {\r
-                                       _username = "";\r
-                                       _password = "";\r
-                               }\r
-               \r
-                               // Lastly, check to see if the authorty has a port number.\r
-                               // This is parsed after the username/password to avoid conflicting\r
-                               // with the ':' in the 'username:password' if one exists.\r
-                               index = _authority.search(':');\r
-                               if (index != -1)\r
-                               {\r
-                                       _port = _authority.substring(index + 1, _authority.length);  // skip the ':'\r
-                                       _authority = _authority.substr(0, index);\r
-                               }\r
-                               else\r
-                               {\r
-                                       _port = "";\r
-                               }\r
-                               \r
-                               // Lastly, normalize the authority.  Domain names\r
-                               // are case insensitive.\r
-                               _authority = _authority.toLowerCase();\r
-                       }\r
-               \r
-                       if ((_valid = validateURI()) == false)\r
-                               initialize();  // Bad URI.  Clear it\r
-               \r
-                       return isValid();\r
-               }\r
-               \r
-               \r
-               /********************************************************************\r
-                * Copy function.\r
-                */\r
-               public function copyURI(uri:URI) : void\r
-               {\r
-                       this._scheme = uri._scheme;\r
-                       this._authority = uri._authority;\r
-                       this._username = uri._username;\r
-                       this._password = uri._password;\r
-                       this._port = uri._port;\r
-                       this._path = uri._path;\r
-                       this._query = uri._query;\r
-                       this._fragment = uri._fragment;\r
-                       this._nonHierarchical = uri._nonHierarchical;\r
-               \r
-                       this._valid = uri._valid;\r
-                       this._relative = uri._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * @private\r
-                * Checks if the given string only contains a-z or A-Z.\r
-                */\r
-               protected function verifyAlpha(str:String) : Boolean\r
-               {\r
-                       var pattern:RegExp = /[^a-z]/;\r
-                       var index:int;\r
-                       \r
-                       str = str.toLowerCase();\r
-                       index = str.search(pattern);\r
-                       \r
-                       if (index == -1)\r
-                               return true;\r
-                       else\r
-                               return false;\r
-               }\r
-               \r
-               /**\r
-                * Is this a valid URI?\r
-                * \r
-                * @return true if this object represents a valid URI, false\r
-                * otherwise.\r
-                */\r
-               public function isValid() : Boolean\r
-               { \r
-                       return this._valid;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI an absolute URI?  An absolute URI is a complete, fully\r
-                * qualified reference to a resource.  e.g. http://site.com/index.htm\r
-                * Non-hierarchical URI's are always absolute.\r
-                */\r
-               public function isAbsolute() : Boolean\r
-               { \r
-                       return !this._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI a relative URI?  Relative URI's do not have a scheme\r
-                * and only contain a relative path with optional anchor and query\r
-                * parts.  e.g. "../reports/index.htm".  Non-hierarchical URI's\r
-                * will never be relative.\r
-                */\r
-               public function isRelative() : Boolean\r
-               { \r
-                       return this._relative;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Does this URI point to a resource that is a directory/folder?\r
-                * The URI specification dictates that any path that ends in a slash\r
-                * is a directory.  This is needed to be able to perform correct path\r
-                * logic when combining relative URI's with absolute URI's to\r
-                * obtain the correct absolute URI to a resource.\r
-                * \r
-                * @see URI.chdir\r
-                * \r
-                * @return true if this URI represents a directory resource, false\r
-                * if this URI represents a file resource.\r
-                */\r
-               public function isDirectory() : Boolean\r
-               {\r
-                       if (_path.length == 0)\r
-                               return false;\r
-               \r
-                       return (_path.charAt(path.length - 1) == '/');\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Is this URI a hierarchical URI? URI's can be  \r
-                */\r
-               public function isHierarchical() : Boolean\r
-               { \r
-                       return hierState;\r
-               }\r
-                               \r
-               \r
-               /**\r
-                * The scheme of the URI.\r
-                */\r
-               public function get scheme() : String\r
-               { \r
-                       return URI.unescapeChars(_scheme);\r
-               }\r
-               public function set scheme(schemeStr:String) : void\r
-               {\r
-                       // Normalize the scheme\r
-                       var normalized:String = schemeStr.toLowerCase();\r
-                       _scheme = URI.fastEscapeChars(normalized, URI.URIschemeExcludedBitmap);\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The authority (host) of the URI.  Only valid for\r
-                * hierarchical URI's.  If the URI is relative, this will\r
-                * be an empty string. When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.\r
-                */\r
-               public function get authority() : String\r
-               { \r
-                       return URI.unescapeChars(_authority);\r
-               }\r
-               public function set authority(authorityStr:String) : void\r
-               {\r
-                       // Normalize the authority\r
-                       authorityStr = authorityStr.toLowerCase();\r
-                       \r
-                       _authority = URI.fastEscapeChars(authorityStr,\r
-                               URI.URIauthorityExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have an authority, make\r
-                       // sure this URI is of the proper format.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The username of the URI.  Only valid for hierarchical\r
-                * URI's.  If the URI is relative, this will be an empty\r
-                * string.\r
-                * \r
-                * <p>The URI specification allows for authentication\r
-                * credentials to be embedded in the URI as such:</p>\r
-                * \r
-                * <p>http://user:passwd&#64;host/path/to/file.htm</p>\r
-                * \r
-                * <p>When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.</p>\r
-                */\r
-               public function get username() : String\r
-               {\r
-                       return URI.unescapeChars(_username);\r
-               }\r
-               public function set username(usernameStr:String) : void\r
-               {\r
-                       _username = URI.fastEscapeChars(usernameStr, URI.URIuserpassExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have a username.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The password of the URI.  Similar to username.\r
-                * @see URI.username\r
-                */\r
-               public function get password() : String\r
-               {\r
-                       return URI.unescapeChars(_password);\r
-               }\r
-               public function set password(passwordStr:String) : void\r
-               {\r
-                       _password = URI.fastEscapeChars(passwordStr,\r
-                               URI.URIuserpassExcludedBitmap);\r
-                       \r
-                       // Only hierarchical URI's can have a password.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The host port number.  Only valid for hierarchical URI's.  If\r
-                * the URI is relative, this will be an empty string. URI's can\r
-                * contain the port number of the remote host:\r
-                * \r
-                * <p>http://site.com:8080/index.htm</p>\r
-                */\r
-               public function get port() : String\r
-               { \r
-                       return URI.unescapeChars(_port);\r
-               }\r
-               public function set port(portStr:String) : void\r
-               {\r
-                       _port = URI.escapeChars(portStr);\r
-                       \r
-                       // Only hierarchical URI's can have a port.\r
-                       this.hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The path portion of the URI.  Only valid for hierarchical\r
-                * URI's.  When setting this value, the string\r
-                * given is assumed to be unescaped.  When retrieving this\r
-                * value, the resulting string is unescaped.\r
-                * \r
-                * <p>The path portion can be in one of two formats. 1) an absolute\r
-                * path, or 2) a relative path.  An absolute path starts with a\r
-                * slash ('/'), a relative path does not.</p>\r
-                * \r
-                * <p>An absolute path may look like:</p>\r
-                * <listing>/full/path/to/my/file.htm</listing>\r
-                * \r
-                * <p>A relative path may look like:</p>\r
-                * <listing>\r
-                * path/to/my/file.htm\r
-                * ../images/logo.gif\r
-                * ../../reports/index.htm\r
-                * </listing>\r
-                * \r
-                * <p>Paths can be absolute or relative.  Note that this not the same as\r
-                * an absolute or relative URI.  An absolute URI can only have absolute\r
-                * paths.  For example:</p>\r
-                * \r
-                * <listing>http:/site.com/path/to/file.htm</listing>\r
-                * \r
-                * <p>This absolute URI has an absolute path of "/path/to/file.htm".</p>\r
-                * \r
-                * <p>Relative URI's can have either absolute paths or relative paths.\r
-                * All of the following relative URI's are valid:</p>\r
-                * \r
-                * <listing>\r
-                * /absolute/path/to/file.htm\r
-                * path/to/file.htm\r
-                * ../path/to/file.htm\r
-                * </listing>\r
-                */\r
-               public function get path() : String\r
-               { \r
-                       return URI.unescapeChars(_path);\r
-               }\r
-               public function set path(pathStr:String) : void\r
-               {       \r
-                       this._path = URI.fastEscapeChars(pathStr, URI.URIpathExcludedBitmap);\r
-               \r
-                       if (this._scheme == UNKNOWN_SCHEME)\r
-                       {\r
-                               // We set the path.  This is a valid URI now.\r
-                               this._scheme = "";\r
-                       }\r
-               \r
-                       // Only hierarchical URI's can have a path.\r
-                       hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The query (CGI) portion of the URI.  This part is valid for\r
-                * both hierarchical and non-hierarchical URI's.\r
-                * \r
-                * <p>This accessor should only be used if a custom query syntax\r
-                * is used.  This URI class supports the common "param=value"\r
-                * style query syntax via the get/setQueryValue() and\r
-                * get/setQueryByMap() functions.  Those functions should be used\r
-                * instead if the common syntax is being used.\r
-                * \r
-                * <p>The URI RFC does not specify any particular\r
-                * syntax for the query part of a URI.  It is intended to allow\r
-                * any format that can be agreed upon by the two communicating hosts.\r
-                * However, most systems have standardized on the typical CGI\r
-                * format:</p>\r
-                * \r
-                * <listing>http://site.com/script.php?param1=value1&param2=value2</listing>\r
-                * \r
-                * <p>This class has specific support for this query syntax</p>\r
-                * \r
-                * <p>This common query format is an array of name/value\r
-                * pairs with its own syntax that is different from the overall URI\r
-                * syntax.  The query has its own escaping logic.  For a query part\r
-                * to be properly escaped and unescaped, it must be split into its\r
-                * component parts.  This accessor escapes/unescapes the entire query\r
-                * part without regard for it's component parts.  This has the\r
-                * possibliity of leaving the query string in an ambiguious state in\r
-                * regards to its syntax.  If the contents of the query part are\r
-                * important, it is recommended that get/setQueryValue() or\r
-                * get/setQueryByMap() are used instead.</p>\r
-                * \r
-                * If a different query syntax is being used, a subclass of URI\r
-                * can be created to handle that specific syntax.\r
-                *  \r
-                * @see URI.getQueryValue, URI.getQueryByMap\r
-                */\r
-               public function get query() : String\r
-               { \r
-                       return URI.unescapeChars(_query);\r
-               }\r
-               public function set query(queryStr:String) : void\r
-               {\r
-                       _query = URI.fastEscapeChars(queryStr, URI.URIqueryExcludedBitmap);\r
-                       \r
-                       // both hierarchical and non-hierarchical URI's can\r
-                       // have a query.  Do not set the hierState.\r
-               }\r
-               \r
-               /**\r
-                * Accessor to the raw query data.  If you are using a custom query\r
-                * syntax, this accessor can be used to get and set the query part\r
-                * directly with no escaping/unescaping.  This should ONLY be used\r
-                * if your application logic is handling custom query logic and\r
-                * handling the proper escaping of the query part.\r
-                */\r
-               public function get queryRaw() : String\r
-               {\r
-                       return _query;\r
-               }\r
-               public function set queryRaw(queryStr:String) : void\r
-               {\r
-                       _query = queryStr;\r
-               }\r
-\r
-\r
-               /**\r
-                * The fragment (anchor) portion of the URI.  This is valid for\r
-                * both hierarchical and non-hierarchical URI's.\r
-                */\r
-               public function get fragment() : String\r
-               { \r
-                       return URI.unescapeChars(_fragment);\r
-               }\r
-               public function set fragment(fragmentStr:String) : void\r
-               {\r
-                       _fragment = URI.fastEscapeChars(fragmentStr, URIfragmentExcludedBitmap);\r
-\r
-                       // both hierarchical and non-hierarchical URI's can\r
-                       // have a fragment.  Do not set the hierState.\r
-               }\r
-               \r
-               \r
-               /**\r
-                * The non-hierarchical part of the URI.  For example, if\r
-                * this URI object represents "mailto:somebody@company.com",\r
-                * this will contain "somebody@company.com".  This is valid only\r
-                * for non-hierarchical URI's.  \r
-                */\r
-               public function get nonHierarchical() : String\r
-               { \r
-                       return URI.unescapeChars(_nonHierarchical);\r
-               }\r
-               public function set nonHierarchical(nonHier:String) : void\r
-               {\r
-                       _nonHierarchical = URI.fastEscapeChars(nonHier, URInonHierexcludedBitmap);\r
-                       \r
-                       // This is a non-hierarchical URI.\r
-                       this.hierState = false;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * Quick shorthand accessor to set the parts of this URI.\r
-                * The given parts are assumed to be in unescaped form.  If\r
-                * the URI is non-hierarchical (e.g. mailto:) you will need\r
-                * to call SetScheme() and SetNonHierarchical().\r
-                */\r
-               public function setParts(schemeStr:String, authorityStr:String,\r
-                               portStr:String, pathStr:String, queryStr:String,\r
-                               fragmentStr:String) : void\r
-               {\r
-                       this.scheme = schemeStr;\r
-                       this.authority = authorityStr;\r
-                       this.port = portStr;\r
-                       this.path = pathStr;\r
-                       this.query = queryStr;\r
-                       this.fragment = fragmentStr;\r
-\r
-                       hierState = true;\r
-               }\r
-               \r
-               \r
-               /**\r
-                * URI escapes the given character string.  This is similar in function\r
-                * to the global encodeURIComponent() function in ActionScript, but is\r
-                * slightly different in regards to which characters get escaped.  This\r
-                * escapes the characters specified in the URIbaselineExluded set (see class\r
-                * static members).  This is needed for this class to work properly.\r
-                * \r
-                * <p>If a different set of characters need to be used for the escaping,\r
-                * you may use fastEscapeChars() and specify a custom URIEncodingBitmap\r
-                * that contains the characters your application needs escaped.</p>\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param unescaped character string to be escaped.\r
-                * \r
-                * @return      escaped character string\r
-                * \r
-                * @see encodeURIComponent\r
-                * @see fastEscapeChars\r
-                */\r
-               static public function escapeChars(unescaped:String) : String\r
-               {\r
-                       // This uses the excluded set by default.\r
-                       return fastEscapeChars(unescaped, URI.URIbaselineExcludedBitmap);\r
-               }\r
-               \r
-\r
-               /**\r
-                * Unescape any URI escaped characters in the given character\r
-                * string.\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param escaped the escaped string to be unescaped.\r
-                * \r
-                * @return      unescaped string.\r
-                */\r
-               static public function unescapeChars(escaped:String /*, onlyHighASCII:Boolean = false*/) : String\r
-               {\r
-                       // We can just use the default AS function.  It seems to\r
-                       // decode everything correctly\r
-                       var unescaped:String;\r
-                       unescaped = decodeURIComponent(escaped);\r
-                       return unescaped;\r
-               }\r
-               \r
-               /**\r
-                * Performance focused function that escapes the given character\r
-                * string using the given URIEncodingBitmap as the rule for what\r
-                * characters need to be escaped.  This function is used by this\r
-                * class and can be used externally to this class to perform\r
-                * escaping on custom character sets.\r
-                * \r
-                * <p>Never pass a full URI to this function.  A URI can only be properly\r
-                * escaped/unescaped when split into its component parts (see RFC 3986\r
-                * section 2.4).  This is due to the fact that the URI component separators\r
-                * could be characters that would normally need to be escaped.</p>\r
-                * \r
-                * @param unescaped             the unescaped string to be escaped\r
-                * @param bitmap                the set of characters that need to be escaped\r
-                * \r
-                * @return      the escaped string.\r
-                */\r
-               static public function fastEscapeChars(unescaped:String, bitmap:URIEncodingBitmap) : String\r
-               {\r
-                       var escaped:String = "";\r
-                       var c:String;\r
-                       var x:int, i:int;\r
-                       \r
-                       for (i = 0; i < unescaped.length; i++)\r
-                       {\r
-                               c = unescaped.charAt(i);\r
-                               \r
-                               x = bitmap.ShouldEscape(c);\r
-                               if (x)\r
-                               {\r
-                                       c = x.toString(16);\r
-                                       if (c.length == 1)\r
-                                               c = "0" + c;\r
-                                               \r
-                                       c = "%" + c;\r
-                                       c = c.toUpperCase();\r
-                               }\r
-                               \r
-                               escaped += c;\r
-                       }\r
-                       \r
-                       return escaped;\r
-               }\r
-\r
-               \r
-               /**\r
-                * Is this URI of a particular scheme type?  For example,\r
-                * passing "http" to a URI object that represents the URI\r
-                * "http://site.com/" would return true.\r
-                * \r
-                * @param scheme        scheme to check for\r
-                * \r
-                * @return true if this URI object is of the given type, false\r
-                * otherwise.\r
-                */\r
-               public function isOfType(scheme:String) : Boolean\r
-               {\r
-                       // Schemes are never case sensitive.  Ignore case.\r
-                       scheme = scheme.toLowerCase();\r
-                       return (this._scheme == scheme);\r
-               }\r
-\r
-\r
-               /**\r
-                * Get the value for the specified named in the query part.  This\r
-                * assumes the query part of the URI is in the common\r
-                * "name1=value1&name2=value2" syntax.  Do not call this function\r
-                * if you are using a custom query syntax.\r
-                * \r
-                * @param name  name of the query value to get.\r
-                * \r
-                * @return the value of the query name, empty string if the\r
-                * query name does not exist.\r
-                */\r
-               public function getQueryValue(name:String) : String\r
-               {\r
-                       var map:Object;\r
-                       var item:String;\r
-                       var value:String;\r
-               \r
-                       map = getQueryByMap();\r
-               \r
-                       for (item in map)\r
-                       {\r
-                               if (item == name)\r
-                               {\r
-                                       value = map[item];\r
-                                       return value;\r
-                               }\r
-                       }\r
-               \r
-                       // Didn't find the specified key\r
-                       return new String("");\r
-               }\r
-               \r
-\r
-               /**\r
-                * Set the given value on the given query name.  If the given name\r
-                * does not exist, it will automatically add this name/value pair\r
-                * to the query.  If null is passed as the value, it will remove\r
-                * the given item from the query.\r
-                * \r
-                * <p>This automatically escapes any characters that may conflict with\r
-                * the query syntax so that they are "safe" within the query.  The\r
-                * strings passed are assumed to be literal unescaped name and value.</p>\r
-                * \r
-                * @param name  name of the query value to set\r
-                * @param value value of the query item to set.  If null, this will\r
-                * force the removal of this item from the query.\r
-                */\r
-               public function setQueryValue(name:String, value:String) : void\r
-               {\r
-                       var map:Object;\r
-\r
-                       map = getQueryByMap();\r
-               \r
-                       // If the key doesn't exist yet, this will create a new pair in\r
-