linux - How does java AsynchronousFileChannel work if the kernel not support AIO -
i have 2 questions
how asynchronousfilechannel work if operating system not support aio (lower linux 2.6 etc).
how append sth asynchronousfilechannel, far know asynchronousfilechannel supports write(bytebuffer, long position, attachment, completionhandler handler) , write(bytebuffer src, long position) both need position param. should count position myself?
question 2: javadoc
an asynchronous file channel not have current position within file. instead, file position specified each read , write method initiates asynchronous operations.
so yes, need keep track of position yourself.
Comments
Post a Comment