Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NX: about nio  RSS feed

 
Bigwood Liu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had never used nio before, and have some questions:
1.I map the data section of database into memory by fileChannel.map(), I saw someone use allocate() to allocate the buffer's capacity, I think the following is enough am I right? Why after I map the file, the isLoaded() return false? Whether the FileChannel will be closed at some time in the future? and how to?
2.I set the current position to the end of cache, and put a char, and
force(), but the length of the file stored in harddisk increased far more than one char, why?

Thank you first,
Regards,
Damu
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!