wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: about nio Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "NX: about nio" Watch "NX: about nio" New topic
Author

NX: about nio

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
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.
 
subject: NX: about nio
 
Similar Threads
Java nio
New IO
how to resolve Data file
nio performance issue
FileChannel, MappedByteByffer, NIO questions