AsynchronousCharChannel
Gili
cowwoc at bbs.darktech.org
Thu Jun 25 15:26:08 PDT 2009
I found Alex's JProactor framework here:
http://jproactor.svn.sourceforge.net/viewvc/jproactor/trunk/nio2/src/au/com/terabit/nio2/filter/
I have two problems with AsynchronousCoder.
1) The code is sparsely documented.
2) It's too "abstract". I'm looking for a practical/simple solution to a
common use-case.
I don't think it makes sense to implement readLine() the same way as
read(CharBuffer) because in the former case you know how many characters the
buffer must contain whereas in the latter case you have no idea how long the
line will be. That's why BufferedReader.readLine() returns a String instead
of taking in a char[].
Anyway, I think we better wait until I finish implementing this API. Once
I'm done I will post the code for your review and you can judge how well it
fits (or not) alongside NIO2.
Thank you,
Gili
Alan Bateman wrote:
>
> Gili wrote:
>> Hi,
>>
>> I just wanted to let you know I'm almost done implementing a
>> AsynchronousCharChannel that takes a AsynchronousByteChannel as input and
>> provides the following functionality:
>>
>> read/write CharBuffer
>> readLine()
>>
>> I hope no one else is working on the same thing... When I'm done, is
>> there a
>> chance this will end up in the official NIO2 release?
>>
>> Gili
>>
> Alex Libman has built a filter framework on this API and it includes an
> AsynchronousCoder for char I/O. You might want to bring it up on the
> nio-dev mailing list for more discussion.
>
> -Alan.
>
>
--
View this message in context: http://n2.nabble.com/AsynchronousCharChannel-tp3156277p3158181.html
Sent from the nio-discuss mailing list archive at Nabble.com.
More information about the nio-discuss
mailing list