Android non-blocking file i/o?

I'm currently writing an async i/o library for Java that has a very similar API to Node.js. I could do the socket part with nio, but there seems to be no FileChannel that extends SelectableChannel so I can't do the file i/o with nio, too.

In Java 7 they added AnsynchronousFileChannel, which allows non-blocking file i/o. Unfortunately, Android does not support it. Is there an equivalent class on Android to do non-blocking file io?

You can find the library here: https://github.com/VanCoding/Node.java

A sample App is located here: https://github.com/VanCoding/Node.java/blob/master/src/node/examples/App.java

Answers


Is there an equivalent class on Android to do non-blocking file io?

Other than your wrapping traditional I/O in a background thread, no, sorry.


Need Your Help

Android NavigationView MenuItem Icon Animation

android animation

I'm trying to understand if menu icon animation should work in the new

Recreate and send packet captured by nfqueue

c++ c linux network-programming netfilter

I capture all the packets in one side with help of nfqueue, "record" them (all the data: ip info, next protocol info etc) with nfq_get_payload and deliver them into another side with help of udp. H...