Started work on the 'crowd' package.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3935 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-03-10 03:05:37 +00:00
parent 3f5aed3555
commit ca66f91ac7
31 changed files with 2650 additions and 57 deletions
@@ -0,0 +1,37 @@
package com.threerings.io.streamers {
import com.threerings.util.Integer;
import com.threerings.io.ObjectInputStream;
import com.threerings.io.ObjectOutputStream;
import com.threerings.io.Streamer;
/**
* A Streamer for Integer objects.
*/
public class IntegerStreamer extends Streamer
{
public function IntegerStreamer ()
{
super(Integer, "java.lang.Integer");
}
public override function createObject (ins :ObjectInputStream) :Object
{
return new Integer(ins.readInt());
}
public override function writeObject (obj :Object, out :ObjectOutputStream)
:void
{
var inty :Integer = (obj as Integer);
out.writeInt(inty.value);
}
public override function readObject (obj :Object, ins :ObjectInputStream)
:void
{
// unneeded, done in createObject
}
}
}