Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: about nio

 
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic