Streaming fixups on the path towards getting things working in beta3.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4105 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-10 00:40:15 +00:00
parent e100ef4faf
commit b82108ecea
5 changed files with 50 additions and 40 deletions
+4 -10
View File
@@ -4,6 +4,7 @@ import com.threerings.io.Streamable;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.TypedArray;
import com.threerings.util.StringBuilder;
@@ -23,7 +24,7 @@ public class OidList
*/
public function OidList ()
{
_oids = new Array();
_oids = new TypedArray("[I");
}
/**
@@ -107,16 +108,9 @@ public class OidList
// documentation inherited from interface Streamable
public function readObject (ins :ObjectInputStream) :void
{
// TODO: this is some custom shit. We need to work out array streaming
_oids = new Array();
var ecount :int = ins.readInt();
for (var ii :int = 0; ii < ecount; ii++) {
_oids.push(ins.readInt());
}
_oids.length = ins.readInt(); // then, limit the length to the size
_oids = (ins.readField("[I") as TypedArray);
}
public function toString () :String
{
var buf :StringBuilder = new StringBuilder();
@@ -126,6 +120,6 @@ public class OidList
return buf.toString();
}
private var _oids :Array;
private var _oids :TypedArray;
}
}