Some examples.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5961 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-09-17 21:53:02 +00:00
parent a24b0d2d03
commit f9bc385c99
2 changed files with 20 additions and 3 deletions
@@ -154,11 +154,11 @@ public class ObjectInputStream
}
/**
* Called to read an Object of a known final type into a Streamable object.
*
* @param type either a String representing the java type,
* or a Class object representing the actionscript type.
*/
// TODO: this is the equivalent of marshalling something for which
// we have a basic streamer. Fill out with all the java types
public function readField (type :Object) :Object
//throws IOError
{
+18 -1
View File
@@ -106,7 +106,24 @@ public class ObjectOutputStream
}
/**
* This is equivalent to marshalling a field for which there is a basic streamer.
* Called to write an object reference within a Streamable object when the type of the
* field is a final type.
*
* @example This is how you would do it, even if s and o referred to the same String object!
* <listing version="3.0">
* public class Foo
* implements Streamable
* {
* public var o :Object;
* public var s :String;
* ...
* public function writeObject (out :ObjectOutputStream) :void
* {
* out.writeObject(o);
* out.writeField(s);
* }
* }
* </listing>
*/
public function writeField (val :Object) :void
//throws IOError