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;
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var bytes :ByteArray = (obj as ByteArray);
|
var bytes :ByteArray = (obj as ByteArray);
|
||||||
out.writeInt(bytes.length);
|
out.writeInt(bytes.length);
|
||||||
out.writeBytes(bytes);
|
out.writeBytes(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var bytes :ByteArray = (obj as ByteArray);
|
var bytes :ByteArray = (obj as ByteArray);
|
||||||
ins.readBytes(bytes, 0, bytes.length);
|
ins.readBytes(bytes, 0, bytes.length);
|
||||||
|
|||||||
@@ -42,15 +42,13 @@ public class ByteStreamer extends Streamer
|
|||||||
return new Byte(ins.readByte());
|
return new Byte(ins.readByte());
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var byte :Byte = (obj as Byte);
|
var byte :Byte = (obj as Byte);
|
||||||
out.writeByte(byte.value);
|
out.writeByte(byte.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// unneeded, done in createObject
|
// unneeded, done in createObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,15 +42,13 @@ public class FloatStreamer extends Streamer
|
|||||||
return new Float(ins.readFloat());
|
return new Float(ins.readFloat());
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var float :Float = (obj as Float);
|
var float :Float = (obj as Float);
|
||||||
out.writeFloat(float.value);
|
out.writeFloat(float.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// unneeded, done in createObject
|
// unneeded, done in createObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,15 +42,13 @@ public class IntegerStreamer extends Streamer
|
|||||||
return new Integer(ins.readInt());
|
return new Integer(ins.readInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var inty :Integer = (obj as Integer);
|
var inty :Integer = (obj as Integer);
|
||||||
out.writeInt(inty.value);
|
out.writeInt(inty.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// unneeded, done in createObject
|
// unneeded, done in createObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,15 +42,13 @@ public class LongStreamer extends Streamer
|
|||||||
return new Long();
|
return new Long();
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var longy :Long = (obj as Long);
|
var longy :Long = (obj as Long);
|
||||||
out.writeBytes(longy.bytes, 0, longy.bytes.length);
|
out.writeBytes(longy.bytes, 0, longy.bytes.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var longy :Long = (obj as Long);
|
var longy :Long = (obj as Long);
|
||||||
ins.readBytes(longy.bytes, 0, longy.bytes.length);
|
ins.readBytes(longy.bytes, 0, longy.bytes.length);
|
||||||
|
|||||||
@@ -40,15 +40,13 @@ public class NumberStreamer extends Streamer
|
|||||||
return ins.readDouble();
|
return ins.readDouble();
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var n :Number = (obj as Number);
|
var n :Number = (obj as Number);
|
||||||
out.writeDouble(n);
|
out.writeDouble(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// nothing here, the Number is fully read in createObject()
|
// nothing here, the Number is fully read in createObject()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,15 +42,13 @@ public class ShortStreamer extends Streamer
|
|||||||
return new Short(ins.readShort());
|
return new Short(ins.readShort());
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var short :Short = (obj as Short);
|
var short :Short = (obj as Short);
|
||||||
out.writeShort(short.value);
|
out.writeShort(short.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// unneeded, done in createObject
|
// unneeded, done in createObject
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,15 +40,13 @@ public class StringStreamer extends Streamer
|
|||||||
return ins.readUTF();
|
return ins.readUTF();
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function writeObject (obj :Object, out :ObjectOutputStream)
|
override public function writeObject (obj :Object, out :ObjectOutputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
var s :String = (obj as String);
|
var s :String = (obj as String);
|
||||||
out.writeUTF(s);
|
out.writeUTF(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
override public function readObject (obj :Object, ins :ObjectInputStream)
|
override public function readObject (obj :Object, ins :ObjectInputStream) :void
|
||||||
:void
|
|
||||||
{
|
{
|
||||||
// nothing here, the String is fully read in createObject()
|
// nothing here, the String is fully read in createObject()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user