lock « nio « Java I/O Q&A

Home
Java I/O Q&A
1.API
2.batch File
3.binary File
4.class file
5.CSV file
6.deploy
7.Development
8.directory
9.error
10.Excel File
11.File Attribute
12.jar
13.Log
14.Media File
15.nio
16.Operation
17.PDF file
18.PropertyFile
19.serialize
20.text file
21.Windows
22.XML file
23.Zip
Java I/O Q&A » nio » lock 

1. When using Java's FileLock, is it ok to let close() to automatically do a lock.release()?    stackoverflow.com

As most should know close() also closes any streams uses. This allows the follow code:

BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(...)));
...
br.close();
This is nice, since we don't need a reference to FileInputStream and ...

2. File locking and deleteing strategy using nio    coderanch.com

I've got a bunch of client apps all polling a single remote directory for new files, when one of the clients sees a new file it locks the file using a FileLock and copies it to another directory. Once that's done I need the client to delete the original file. The problem is that unless I release the FileLock I can't ...

3. NIO, locking and Win-XP    coderanch.com

This is reposted from Java in General, Intermediate. I had no response there, but this looks like a better place to post it. I've searched for how Win-XP handles shared locks and exclusive locks under nio, but have been unable to find anything yet. I have one program that reads a file, and does a shared lock of part of the ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.