httpurlconnection chunked output stream?

Hi,

I'm developing a client that interacts with a comet server (comet allows http connections to be used for multiple inputs and outputs on same connection -- not single request, single response). I've found that I can't use HttpURLConnection because it doesn't allow writing to its output stream after any input has been read from its input stream. It seems that httpURLConn.getInputStream() basically closes the output stream. Is there any way around this? Any way to write to an httpurlconnection's output stream after a read on its input has occurred?

For now I have to resort to using raw sockets and dealing with headers and chunked encoding manually. I'd sure love an easier way...

Thanks for any help,

Peter

[753 byte] By [otismollya] at [2007-11-27 6:31:58]
# 1
Get a new HTTPURLConnection. Java will cache it behind the scenes to reuse the same TCP connection.
ejpa at 2007-7-12 17:57:07 > top of Java-index,Core,Core APIs...