The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the Wayback Machine.
Enable Cross-platform File Locking with a Lock Server
A custom shared lock server can overcome file-locking differences between operating systems or Java implementations.
by Greg Travis
October 21, 2002
JDK 1.4 adds a number of advanced features related to I/O and filesystems. The more advanced I/O features are often non-portable or only partially portable. File locking is one of these features. While most operating systems provide some form of file locking, file locking isn't implemented exactly the same way on every platform.
For a general example of file locking in Java, review the following code snippet. It locks the first 10 bytes of a file called "foo.txt":
RandomAccessFile raf =
new RandomAccessFile( "foo.txt", "rw" );
FileChannel fc = raf.getChannel();
FileLock lock = fc.lock( 0, 10, false );
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!