Results 1 to 1 of 1
- 07-29-2011, 07:14 PM #1Member
- Join Date
- Jul 2011
- Rep Power
Java7 asynchronous IO and ObjectInput/-Output streams
I am not new to java, but I am new to this forum and Java 7, and I have a question about how to use the latter.
The new classes for asynchronous IO seem fantastic and I'd like to start using them right away (I have actually been emulating their behaviour with lots of threads doing blocking operations until now), but there is just one problem - I am relying heavily on Java object serialization in my networking classes and I can't seem to figure out how to for example use the new asynchronous behaviour while reading/writing objects.
Sure I can use static methods in the Channels class to create ObjectInputStreams/-OutputStreams from for example an AsynchronousSocketChannel....however. That just produces a standard stream which doesn't have capability to set CompletionHandlers as far as I can tell --> meaning the readobject/writeobject are standard.
What I need is something like a method readObject(attachment, completionhandler)
Any ideas on how I should procede to do this?
- By subhayan in forum NetworkingReplies: 7Last Post: 02-24-2010, 09:00 PM
- By TheCHaos0 in forum NetworkingReplies: 1Last Post: 12-09-2009, 04:42 PM
- By andre1011 in forum NetworkingReplies: 1Last Post: 03-24-2009, 09:18 AM
- By Rhesus21 in forum NetworkingReplies: 3Last Post: 07-30-2008, 02:26 AM
- By crookshank in forum New To JavaReplies: 0Last Post: 06-05-2008, 03:41 PM