Liferay 7.0-ce-b4

com.liferay.portal.kernel.nio
Class FileChannelWrapper

java.lang.Object
  extended by java.nio.channels.spi.AbstractInterruptibleChannel
      extended by java.nio.channels.FileChannel
          extended by com.liferay.portal.kernel.nio.FileChannelWrapper
All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, SeekableByteChannel, WritableByteChannel

public class FileChannelWrapper
extends FileChannel


Nested Class Summary
 
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode
 
Constructor Summary
FileChannelWrapper(FileChannel fileChannel)
           
 
Method Summary
 void force(boolean metaData)
           
protected  void implCloseChannel()
           
 FileLock lock(long position, long size, boolean shared)
           
 MappedByteBuffer map(FileChannel.MapMode mapMode, long position, long size)
           
 long position()
           
 FileChannel position(long newPosition)
           
 int read(ByteBuffer byteBuffer)
           
 long read(ByteBuffer[] byteBuffers, int offset, int length)
           
 int read(ByteBuffer byteBuffer, long position)
           
 long size()
           
 long transferFrom(ReadableByteChannel readableByteChannel, long position, long count)
           
 long transferTo(long position, long count, WritableByteChannel target)
           
 FileChannel truncate(long size)
           
 FileLock tryLock(long position, long size, boolean shared)
           
 int write(ByteBuffer byteBuffer)
           
 long write(ByteBuffer[] byteBuffers, int offset, int length)
           
 int write(ByteBuffer byteBuffer, long position)
           
 
Methods inherited from class java.nio.channels.FileChannel
lock, open, open, 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
 

Constructor Detail

FileChannelWrapper

public FileChannelWrapper(FileChannel fileChannel)
Method Detail

force

public void force(boolean metaData)
           throws IOException
Specified by:
force in class FileChannel
Throws:
IOException

lock

public FileLock lock(long position,
                     long size,
                     boolean shared)
              throws IOException
Specified by:
lock in class FileChannel
Throws:
IOException

map

public MappedByteBuffer map(FileChannel.MapMode mapMode,
                            long position,
                            long size)
                     throws IOException
Specified by:
map in class FileChannel
Throws:
IOException

position

public long position()
              throws IOException
Specified by:
position in interface SeekableByteChannel
Specified by:
position in class FileChannel
Throws:
IOException

position

public FileChannel position(long newPosition)
                     throws IOException
Specified by:
position in interface SeekableByteChannel
Overrides:
position in class FileChannel
Throws:
IOException

read

public int read(ByteBuffer byteBuffer)
         throws IOException
Specified by:
read in interface ReadableByteChannel
Specified by:
read in interface SeekableByteChannel
Specified by:
read in class FileChannel
Throws:
IOException

read

public int read(ByteBuffer byteBuffer,
                long position)
         throws IOException
Specified by:
read in class FileChannel
Throws:
IOException

read

public long read(ByteBuffer[] byteBuffers,
                 int offset,
                 int length)
          throws IOException
Specified by:
read in interface ScatteringByteChannel
Specified by:
read in class FileChannel
Throws:
IOException

size

public long size()
          throws IOException
Specified by:
size in interface SeekableByteChannel
Specified by:
size in class FileChannel
Throws:
IOException

transferFrom

public long transferFrom(ReadableByteChannel readableByteChannel,
                         long position,
                         long count)
                  throws IOException
Specified by:
transferFrom in class FileChannel
Throws:
IOException

transferTo

public long transferTo(long position,
                       long count,
                       WritableByteChannel target)
                throws IOException
Specified by:
transferTo in class FileChannel
Throws:
IOException

truncate

public FileChannel truncate(long size)
                     throws IOException
Specified by:
truncate in interface SeekableByteChannel
Overrides:
truncate in class FileChannel
Throws:
IOException

tryLock

public FileLock tryLock(long position,
                        long size,
                        boolean shared)
                 throws IOException
Specified by:
tryLock in class FileChannel
Throws:
IOException

write

public int write(ByteBuffer byteBuffer)
          throws IOException
Specified by:
write in interface SeekableByteChannel
Specified by:
write in interface WritableByteChannel
Specified by:
write in class FileChannel
Throws:
IOException

write

public int write(ByteBuffer byteBuffer,
                 long position)
          throws IOException
Specified by:
write in class FileChannel
Throws:
IOException

write

public long write(ByteBuffer[] byteBuffers,
                  int offset,
                  int length)
           throws IOException
Specified by:
write in interface GatheringByteChannel
Specified by:
write in class FileChannel
Throws:
IOException

implCloseChannel

protected void implCloseChannel()
Specified by:
implCloseChannel in class AbstractInterruptibleChannel

Liferay 7.0-ce-b4