com.faunos.util.io
Class FilterFileChannel.FilterFileLock

java.lang.Object
  extended by java.nio.channels.FileLock
      extended by com.faunos.util.io.FilterFileChannel.FilterFileLock
Enclosing class:
FilterFileChannel

protected static class FilterFileChannel.FilterFileLock
extends FileLock

A FileLock filter. The main point about this implementation is that it returns the correct FileChannel.

Author:
Babak Farhang

Field Summary
protected  FileLock innerLock
           
 
Constructor Summary
protected FilterFileChannel.FilterFileLock(FileLock innerLock, FilterFileChannel channel)
           
protected FilterFileChannel.FilterFileLock(FileLock innerLock, FilterFileChannel channel, long position, long size, boolean shared)
           
 
Method Summary
 boolean isValid()
          Delegates to the underlying lock.
 void release()
          Delegates to the underlying lock.
 
Methods inherited from class java.nio.channels.FileLock
channel, isShared, overlaps, position, size, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

innerLock

protected final FileLock innerLock
Constructor Detail

FilterFileChannel.FilterFileLock

protected FilterFileChannel.FilterFileLock(FileLock innerLock,
                                           FilterFileChannel channel)

FilterFileChannel.FilterFileLock

protected FilterFileChannel.FilterFileLock(FileLock innerLock,
                                           FilterFileChannel channel,
                                           long position,
                                           long size,
                                           boolean shared)
Method Detail

isValid

public boolean isValid()
Delegates to the underlying lock.

Specified by:
isValid in class FileLock

release

public void release()
             throws IOException
Delegates to the underlying lock.

Specified by:
release in class FileLock
Throws:
IOException


SourceForge.net Logo