LEAD-196 return FileDescriptor. implement write(int, boolean), there are still some TODO to make it fully work.