SimpleAsynchronousFileChannelImpl implRead() and implWrite() fail for named pipes
Alan Bateman
Alan.Bateman at oracle.com
Fri Nov 15 13:15:12 PST 2013
On 15/11/2013 19:08, Jeffrey Shaw wrote:
> Hello,
> I want to perform asynchronous reads and writes on named pipes in a
> non-Windows environment. Named pipes are not seekable.
> sun.nio.ch.IOUtil.read() and write() appear to have special behavior
> defined for when position = -1 that does not involve seeking.
> Unfortunately, sun.nio.ch
> <http://sun.nio.ch>.SimpleAsynchronousFileChannelImpl readImpl() and
> writeImpl() both throw exceptions if position < -1, even though
> position = -1 is both allowed by the IOUtil functions and required for
> use with named pipes.
>
> Is this a bug I or someone else can file?
>
> I haven't checked WindowsAsynchronousFileChannelImpl for the same problem.
>
> Thanks,
> Jeff
There isn't really any support for named pipe. It has come up a few
times and wouldn't be too hard to have a SocketChannel or
AsynchronousSocketChannel to a pipe. AsynchronousFileChannel is about
accessing a file by position so I don't think this would be a good fit
for pipes.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20131115/cd57e51f/attachment.html
More information about the nio-dev
mailing list