Open GoogleCodeExporter opened 9 years ago
I managed to figure out a way to test on IOS, but while debugging I ran across
something I don't understand - in the IOSImplementation.setOutputStreamingMode,
I had put a test:
if (connection instanceof HttpURLConnection) {
// etc
}
When I study the impl code further, this should have evaluated to false and
been ignored, because impl.connect() returns an
IOSImplementation.NetworkConnection, which extends InputStream. BUT, on the
physical 3G device, the test evaluates to true, connection being an instance of
an Apache Harmony implementation of HttpURLConnection. I'm not sure how this
is happening, unless the IOSImplementation on the server differs from what I'm
seeing in SVN.
(Further note, the call to connection.setFixedLengthStreamingMode() failed
because the connection was already open (probably during the call to connect()
which appears to open as an inputstream immediately) - streaming mode has to be
enabled before the connection is opened).
Original comment by 1815...@coolman.ca
on 22 Sep 2012 at 8:47
I have no idea why instanceof didn't work for you on iOS. I had some issues
with it with Array literals but not with plain instanceof. Please ping me about
this after JavaOne. I'm working hard on the Windows Phone stuff and don't even
have the sessions for J1 fully ready...
Original comment by shai.almog
on 23 Sep 2012 at 7:53
[deleted comment]
I'll submit a revised patch for this one soon to capture the
"IllegalStateException" when setting streaming mode, so that it silently
ignores (except log a warning) if a user tries to set streaming mode after a
connection is opened. This will resolve that last note in comment 1. When this
situation occurs, it only means the user will be limited in the size of data
they can send.
Original comment by 1815...@coolman.ca
on 23 Sep 2012 at 8:44
Original issue reported on code.google.com by
1815...@coolman.ca
on 22 Sep 2012 at 8:14Attachments: