Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

URL connection and nio

843790Nov 10 2009 — edited Nov 10 2009
I 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...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2009
Added on Nov 10 2009
4 comments
242 views