This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NX: about nio
 
Similar Threads
Java nio
New IO
how to resolve Data file
nio performance issue
FileChannel, MappedByteByffer, NIO questions