Match changes to DSet.java streaming implementation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3939 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -222,15 +222,19 @@ public class DSet
|
||||
// documentation inherited from interface Streamable
|
||||
public function writeObject (out :ObjectOutputStream) :void
|
||||
{
|
||||
out.writeObject(_entries);
|
||||
out.writeInt(_entries.length);
|
||||
for (var ii :int = 0; ii < _entries.length; ii++) {
|
||||
out.writeObject(_entries[ii]);
|
||||
}
|
||||
}
|
||||
|
||||
// documentation inherited from interface Streamable
|
||||
public function readObject (ins :ObjectInputStream) :void
|
||||
{
|
||||
_entries = (ins.readObject() as TypedArray);
|
||||
_entries.length = ins.readInt(); // then read the length and limit it
|
||||
_entries.length = ins.readInt();
|
||||
for (var ii :int = 0; ii < _entries.length; ii++) {
|
||||
_entries[ii] = ins.readObject();
|
||||
}
|
||||
}
|
||||
|
||||
/** The entries of the set (in a sparse array). */
|
||||
|
||||
Reference in New Issue
Block a user