 			tf.wordWrap = true;
 			addChild(tf);
 
+			dumpValues();
+		}
+
+		private function dumpValues():void {
+			tf.text = "";
 			var b:ByteArray = new ByteArray();
-			var v:Vector.<int> = new Vector.<int>();
-			for(var z:int = 0; z < 3; ++z)
-				v.push(z);
-			b.writeObject(v);
+			var a:Array = [undefined, null, [], "foo"];
+			a.foo = "qux";
+			a.bar = [];
+			b.writeObject(a);
+			dumpByteArray(b);
+		}
 
-			dumpByteArray(b);
-
+		private function readValues():void {
 			var data:Array = [
 				0x0d, 0x07, 0x00,
 				0x00, 0x00, 0x00, 0x01,
 				0x00, 0x00, 0x00, 0x02,
 				0x00, 0x00, 0x00, 0x03
 			];
-			b = createByteArray(data);
+			var b:ByteArray = createByteArray(data);
 
 			var o:* = b.readObject();
 			tf.appendText(o + "\n");

			} else {
				tf.appendText("Vector is null\n");
			}
		}

		private function dumpByteArray(b:ByteArray):void {

		}
	}
}

import flash.utils.IDataInput;
import flash.utils.IDataOutput;
import flash.utils.IExternalizable;

class Foo implements IExternalizable {
	public var foo:String;

	public function Foo(s:String = "default") {
		foo = s;
	}

	public function writeExternal(output:IDataOutput):void {
		output.writeUTF(foo);
	}

	public function readExternal(input:IDataInput):void {
		foo = input.readUTF();
	}
}
