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 TypeMethodDescriptionvoid
force
(boolean metaData) protected void
lock
(long position, long size, boolean shared) map
(FileChannel.MapMode mapMode, long position, long size) long
position()
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) truncate
(long size) 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.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Constructor Details
-
FileChannelWrapper
-
-
Method Details
-
force
- Specified by:
force
in classFileChannel
- Throws:
IOException
-
lock
- Specified by:
lock
in classFileChannel
- Throws:
IOException
-
map
public MappedByteBuffer map(FileChannel.MapMode mapMode, long position, long size) throws IOException - Specified by:
map
in classFileChannel
- Throws:
IOException
-
position
- Specified by:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileChannel
- Throws:
IOException
-
position
- Specified by:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in interfaceSeekableByteChannel
- Specified by:
read
in classFileChannel
- Throws:
IOException
-
read
- Specified by:
read
in classFileChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceScatteringByteChannel
- Specified by:
read
in classFileChannel
- Throws:
IOException
-
size
- Specified by:
size
in interfaceSeekableByteChannel
- Specified by:
size
in classFileChannel
- Throws:
IOException
-
transferFrom
public long transferFrom(ReadableByteChannel readableByteChannel, long position, long count) throws IOException - Specified by:
transferFrom
in classFileChannel
- Throws:
IOException
-
transferTo
- Specified by:
transferTo
in classFileChannel
- Throws:
IOException
-
truncate
- Specified by:
truncate
in interfaceSeekableByteChannel
- Specified by:
truncate
in classFileChannel
- Throws:
IOException
-
tryLock
- Specified by:
tryLock
in classFileChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceSeekableByteChannel
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classFileChannel
- Throws:
IOException
-
write
- Specified by:
write
in classFileChannel
- Throws:
IOException
-
write
- Specified by:
write
in interfaceGatheringByteChannel
- Specified by:
write
in classFileChannel
- Throws:
IOException
-
implCloseChannel
protected void implCloseChannel()- Specified by:
implCloseChannel
in classAbstractInterruptibleChannel
-