I was wondering if anyone could help me fill in some of the details about how 
URLStreamer works.

Here's what im trying to do: I have a Java back end server that establishes a 
long lived connection to my Flex front end. I am using URLStreamer to do this. 
I am then serializing Java objects into AMF and sending these down to the Flex 
client.

Once the data gets to the Flex client I am getting a progressEvent. I then use 
the readObject method if there are bytes available to be read.

This works absolutely fine from "small" objects, but when I try to send down 
any object with some actual data in it (probably more than 65535 bytes) i get 
this "Error:#2006 Range Error". Also I get array index out of bounds. Both of 
these I get on the actual: urlStreamer.readObject() call!

My theory is that my message is actually too big and is being split among 
several different firings of the progressEvent.

Here's where I need help: 
Is my theory correct? 
If so, how am I supposed to know when I should actually be trying to 
"readObject()"?
If readObject() is supposed to "read the object from the stream"...shouldn't it 
handle these larger objects for me? IE: shouldnt urlStreamer "buffer" the 
partial data for me...and only let me "readObject" when there's a complete 
object to be read? or should I be "buffering" the binary that comes in...trying 
to read object each time there are "bytesAvailable" and if there are 
errors....just swallow them and wait for more bytes?

Any help would be appreciated. I've searched these forums, but it seems like no 
one has been running into things like this. 

Thanks in advance

Reply via email to