Implement asyncwritebytes on JVM.