Package com.liferay.portal.kernel.nio
Class FileChannelWrapper
Object
AbstractInterruptibleChannel
FileChannel
com.liferay.portal.kernel.nio.FileChannelWrapper
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,ReadableByteChannel,ScatteringByteChannel,SeekableByteChannel,WritableByteChannel
- Author:
- Shuyang Zhou
-
Nested Class Summary
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidforce(boolean metaData) protected voidlock(long position, long size, boolean shared) map(FileChannel.MapMode mapMode, long position, long size) longposition()position(long newPosition) intread(ByteBuffer byteBuffer) longread(ByteBuffer[] byteBuffers, int offset, int length) intread(ByteBuffer byteBuffer, long position) longsize()longtransferFrom(ReadableByteChannel readableByteChannel, long position, long count) longtransferTo(long position, long count, WritableByteChannel target) truncate(long size) tryLock(long position, long size, boolean shared) intwrite(ByteBuffer byteBuffer) longwrite(ByteBuffer[] byteBuffers, int offset, int length) intwrite(ByteBuffer byteBuffer, long position) Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Constructor Details
-
FileChannelWrapper
-
-
Method Details
-
force
- Specified by:
forcein classFileChannel- Throws:
IOException
-
lock
- Specified by:
lockin classFileChannel- Throws:
IOException
-
map
public MappedByteBuffer map(FileChannel.MapMode mapMode, long position, long size) throws IOException - Specified by:
mapin classFileChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel- Throws:
IOException
-
position
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Specified by:
readin classFileChannel- Throws:
IOException
-
read
- Specified by:
readin classFileChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceScatteringByteChannel- Specified by:
readin classFileChannel- Throws:
IOException
-
size
- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileChannel- Throws:
IOException
-
transferFrom
public long transferFrom(ReadableByteChannel readableByteChannel, long position, long count) throws IOException - Specified by:
transferFromin classFileChannel- Throws:
IOException
-
transferTo
- Specified by:
transferToin classFileChannel- Throws:
IOException
-
truncate
- Specified by:
truncatein interfaceSeekableByteChannel- Specified by:
truncatein classFileChannel- Throws:
IOException
-
tryLock
- Specified by:
tryLockin classFileChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Specified by:
writein classFileChannel- Throws:
IOException
-
write
- Specified by:
writein classFileChannel- Throws:
IOException
-
write
- Specified by:
writein interfaceGatheringByteChannel- Specified by:
writein classFileChannel- Throws:
IOException
-
implCloseChannel
protected void implCloseChannel()- Specified by:
implCloseChannelin classAbstractInterruptibleChannel
-