/**
* Get the content from a file
*/
protected byte[] get(File file) {
ReadWriteLock lock;
synchronized (this.locks) {
lock = (ReadWriteLock) this.locks.get(file.getAbsolutePath());
if ( lock == null ) {
lock = new FIFOReadWriteLock();
this.locks.put(file.getAbsolutePath(), lock);
}
}
Sync sync = lock.readLock();
try {
sync.acquire();
try {
String content = IOUtils.deserializeString(file);
return content.getBytes();