com.faunos.util.io
Class WorkAroundFileChannel

java.lang.Object
  extended by java.nio.channels.spi.AbstractInterruptibleChannel
      extended by java.nio.channels.FileChannel
          extended by com.faunos.util.io.FilterFileChannel
              extended by com.faunos.util.io.WorkAroundFileChannel
All Implemented Interfaces:
Closeable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, WritableByteChannel

public class WorkAroundFileChannel
extends FilterFileChannel

It's come to this… standardizing on a workaround interface for coping with outstanding bugs surrounding FileChannel implementations.

Author:
Babak Farhang

Nested Class Summary
 
Nested classes/interfaces inherited from class com.faunos.util.io.FilterFileChannel
FilterFileChannel.FilterFileLock
 
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode
 
Field Summary
 
Fields inherited from class com.faunos.util.io.FilterFileChannel
inner
 
Constructor Summary
WorkAroundFileChannel(FileChannel inner)
          Creates a new wrapping instance using the given (buggy) inner FileChannel implementation.
 
Method Summary
 long transferFrom(ReadableByteChannel src, long position, long count)
           
 
Methods inherited from class com.faunos.util.io.FilterFileChannel
checkReadAccess, checkWriteAccess, force, implCloseChannel, implCreateFileLock, lock, map, position, position, read, read, read, size, transferTo, truncate, tryLock, write, write, write
 
Methods inherited from class java.nio.channels.FileChannel
lock, read, tryLock, write
 
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 
Methods inherited from interface java.nio.channels.Channel
close, isOpen
 

Constructor Detail

WorkAroundFileChannel

public WorkAroundFileChannel(FileChannel inner)
Creates a new wrapping instance using the given (buggy) inner FileChannel implementation.

Method Detail

transferFrom

public long transferFrom(ReadableByteChannel src,
                         long position,
                         long count)
                  throws IOException
Overrides:
transferFrom in class FilterFileChannel
Throws:
IOException
See Also:
Google bug search


SourceForge.net Logo