Use the ArrayStreamer to stream regular Arrays as well.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4113 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-05-11 23:58:21 +00:00
parent a9567278ea
commit d123c61606
5 changed files with 32 additions and 54 deletions
+7 -2
View File
@@ -57,7 +57,7 @@ public class Streamer
}
for each (var streamer :Streamer in _streamers) {
if (streamer._target == clazz) {
if (streamer.isStreamerForClass(clazz)) {
return streamer;
}
}
@@ -106,6 +106,11 @@ public class Streamer
return (obj is _target); // scripting langs are weird
}
public function isStreamerForClass (clazz :Class) :Boolean
{
return (clazz == _target);
}
/**
* Return the String to use to identify the class that we're streaming.
*/
@@ -143,8 +148,8 @@ public class Streamer
if (_streamers == null) {
_streamers = [
new StringStreamer(),
new ArrayStreamer("[Ljava.lang.Object;"),
new NumberStreamer(),
new ObjectArrayStreamer(),
new ByteArrayStreamer(),
new ByteStreamer(),
new ShortStreamer(),