Added some missing marshallers.

Use Long instead of long. I had them both (it may be useful so that we
know if we're streaming an object or just 8 bytes of value) but Windows
couldn't fucking tell them apart (case insensitivity) so I nixed one.
Reference some more marshallers in the client so that the classes will
be compiled in.. gawd.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3977 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-03-24 23:49:51 +00:00
parent b7e63c4b38
commit a91bf8b14c
13 changed files with 265 additions and 50 deletions
+2
View File
@@ -11,6 +11,7 @@ import com.threerings.io.streamers.ByteyStreamer;
import com.threerings.io.streamers.ByteArrayStreamer;
import com.threerings.io.streamers.FloatStreamer;
import com.threerings.io.streamers.IntegerStreamer;
import com.threerings.io.streamers.LongStreamer;
import com.threerings.io.streamers.NumberStreamer;
import com.threerings.io.streamers.ObjectArrayStreamer;
import com.threerings.io.streamers.ShortStreamer;
@@ -136,6 +137,7 @@ public class Streamer
new ByteStreamer(),
new ShortStreamer(),
new IntegerStreamer(),
new LongStreamer(),
new FloatStreamer()
];
}
@@ -0,0 +1,40 @@
package com.threerings.io.streamers {
import com.threerings.util.Long;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamer;
/**
* A Streamer for Long objects.
*/
public class LongStreamer extends Streamer
{
public function LongStreamer ()
{
super(Long, "java.lang.Long");
}
public override function createObject (ins :ObjectInputStream) :Object
{
return new Long(0);
}
public override function writeObject (obj :Object, out :ObjectOutputStream)
:void
{
var longy :Long = (obj as Long);
out.writeInt(longy.low);
out.writeInt(longy.high);
}
public override function readObject (obj :Object, ins :ObjectInputStream)
:void
{
var longy :Long = (obj as Long);
longy.low = ins.readInt();
longy.high = ins.readInt();
}
}
}