URL connection and nio
843790Nov 10 2009 — edited Nov 10 2009I am writing a custom content handler, I would like to be able to use block io, using a channel.
I have a URLConnection object from which I can get an InputStream and create a channel thus:
Channel c = Channels.newChannel(urlc.getInputStream());
But from what I can see, the underlying data transfer is still stream based and not block io, so its going to be relatively slow.
Is there someway for me to assocaite an nio channel directly with an URLConnection, before it creates an association with InputStream ?
I hope this is clear...