[Red5] Easy way to test IExternalizable classes with ByteArray?
Tyler Kocheran
rfkrocktk at gmail.com
Thu Oct 16 10:21:38 PDT 2008
I'm fooling around with externalizable classes again and I'm wondering if
there's a simple way to test them without having to code the clientside
equivalent, create a new Red5 project, fire up the server, and do it at
runtime. I thought I'd be able to do something like this in a testing class
(via the main() static method):
JAVA:
ByteArray byteArray = new ByteArray();
IExternalizable externalInstance = new ExternalClassTest();
try {
externalInstance.writeExternal(byteArray);
externalInstance.readExternal(byteArray);
} catch (Exception e) {
e.printStackTrace();
}
Every time I run this, I get a java.nio.BufferUnderflowException.
Is there an easy way to do what I want without firing up the server?
--
And do this, knowing the time, that now it is high time to awake out of
sleep;
for now our salvation is nearer than when we first believed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20081016/b00c6bb2/attachment.html
More information about the Red5
mailing list