Some formatting love, from the futuristic world of 100 column code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5349 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -44,16 +44,14 @@ public class ByteArrayStreamer extends Streamer
|
||||
return bytes;
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var bytes :ByteArray = (obj as ByteArray);
|
||||
out.writeInt(bytes.length);
|
||||
out.writeBytes(bytes);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
var bytes :ByteArray = (obj as ByteArray);
|
||||
ins.readBytes(bytes, 0, bytes.length);
|
||||
|
||||
@@ -42,15 +42,13 @@ public class ByteStreamer extends Streamer
|
||||
return new Byte(ins.readByte());
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var byte :Byte = (obj as Byte);
|
||||
out.writeByte(byte.value);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// unneeded, done in createObject
|
||||
}
|
||||
|
||||
@@ -42,15 +42,13 @@ public class FloatStreamer extends Streamer
|
||||
return new Float(ins.readFloat());
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var float :Float = (obj as Float);
|
||||
out.writeFloat(float.value);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// unneeded, done in createObject
|
||||
}
|
||||
|
||||
@@ -42,15 +42,13 @@ public class IntegerStreamer extends Streamer
|
||||
return new Integer(ins.readInt());
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var inty :Integer = (obj as Integer);
|
||||
out.writeInt(inty.value);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// unneeded, done in createObject
|
||||
}
|
||||
|
||||
@@ -42,15 +42,13 @@ public class LongStreamer extends Streamer
|
||||
return new Long();
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var longy :Long = (obj as Long);
|
||||
out.writeBytes(longy.bytes, 0, longy.bytes.length);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
var longy :Long = (obj as Long);
|
||||
ins.readBytes(longy.bytes, 0, longy.bytes.length);
|
||||
|
||||
@@ -40,15 +40,13 @@ public class NumberStreamer extends Streamer
|
||||
return ins.readDouble();
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var n :Number = (obj as Number);
|
||||
out.writeDouble(n);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// nothing here, the Number is fully read in createObject()
|
||||
}
|
||||
|
||||
@@ -42,15 +42,13 @@ public class ShortStreamer extends Streamer
|
||||
return new Short(ins.readShort());
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var short :Short = (obj as Short);
|
||||
out.writeShort(short.value);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// unneeded, done in createObject
|
||||
}
|
||||
|
||||
@@ -40,15 +40,13 @@ public class StringStreamer extends Streamer
|
||||
return ins.readUTF();
|
||||
}
|
||||
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
||||
:void
|
||||
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||
{
|
||||
var s :String = (obj as String);
|
||||
out.writeUTF(s);
|
||||
}
|
||||
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
||||
:void
|
||||
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||
{
|
||||
// nothing here, the String is fully read in createObject()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user