251566b321
- Specify override first on overridden methods. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4170 542714f4-19e9-0310-aa3c-eee0fc999fb1
41 lines
930 B
ActionScript
41 lines
930 B
ActionScript
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");
|
|
}
|
|
|
|
override public function createObject (ins :ObjectInputStream) :Object
|
|
{
|
|
return new Long(0);
|
|
}
|
|
|
|
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
|
:void
|
|
{
|
|
var longy :Long = (obj as Long);
|
|
out.writeInt(longy.low);
|
|
out.writeInt(longy.high);
|
|
}
|
|
|
|
override public function readObject (obj :Object, ins :ObjectInputStream)
|
|
:void
|
|
{
|
|
var longy :Long = (obj as Long);
|
|
longy.low = ins.readInt();
|
|
longy.high = ins.readInt();
|
|
}
|
|
}
|
|
}
|