aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes java NIO in B&S Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "java NIO in B&S" Watch "java NIO in B&S" New topic
Author

java NIO in B&S

Samuel Ittera
Greenhorn

Joined: Jun 09, 2006
Posts: 9
I was reading the instructions of my assignment, and it does not restrict me from using java.nio. This makes life a whole lot easier ( I am glad I do not need to re-invent the wheel ).

1. I can use a file channel for every record.
2. The locking/unlocking feature is already built in with FileLock.
3. I don't see any need to cache, because I can directly map a ByteBuffer to a single record in the database file.

Can someone give me a reason not to go down this path.

Thank you,
Samuel Ittera SCJP 1.4
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Referring to your second point: how do you get around this (from the FileLock API)?

File locks are held on behalf of the entire Java virtual machine. They are not suitable for controlling access to a file by multiple threads within the same virtual machine.


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
mmg
Greenhorn

Joined: May 10, 2006
Posts: 11
From http://www.sun.com/training/catalog/courses/CX-310-252A.xml :

The following APIs and facilities may not be used:

* Enterprise JavaBeans
* Servlets, JSP technology, or any other web-oriented APIs
* NIO, the New IO facilities
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java NIO in B&S
 
Similar Threads
Delete & Update
B&S DB Design
NX: null and blank string process
Regular Expressions Help needed
How to read data from excel file and store it in the database ?