Interface ReadWriteBytesFileChannel
-
- All Known Subinterfaces:
ContiguousMemoryInterface,FragmentedMemoryInterface
- All Known Implementing Classes:
FileMappedMemoryRegion,FragmentedMemory,MappedMemoryBase,MemoryBase,OffHeapMemory,SafeContiguousMemory
public interface ReadWriteBytesFileChannelMemory objects implementing this interface can read and write bytes to file channels.- Author:
- royer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longreadBytesFromFileChannel(long pBufferPositionInBytes, FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes)longreadBytesFromFileChannel(FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes)Reads data into this memory object for a certain position of a file channel.longwriteBytesToFileChannel(long pBufferPositionInBytes, FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes)Writes data at a given range from this memory object at a given offset of a file channel.longwriteBytesToFileChannel(FileChannel pFileChannel, long pFilePositionInBytes)Writes the whole contents of this memory object at a given offset of a file channel.
-
-
-
Method Detail
-
writeBytesToFileChannel
long writeBytesToFileChannel(FileChannel pFileChannel, long pFilePositionInBytes) throws IOException
Writes the whole contents of this memory object at a given offset of a file channel.- Parameters:
pFileChannel- file channelpFilePositionInBytes- file position- Returns:
- file position past the last written byte.
- Throws:
IOException- Thrown in case of IO problem.
-
writeBytesToFileChannel
long writeBytesToFileChannel(long pBufferPositionInBytes, FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes) throws IOExceptionWrites data at a given range from this memory object at a given offset of a file channel.- Parameters:
pBufferPositionInBytes- offset in memory objectpFileChannel- file channelpFilePositionInBytes- file channel offsetpLengthInBytes- length in bytes- Returns:
- file position past the last written byte.
- Throws:
IOException- Thrown in case of IO problem.
-
readBytesFromFileChannel
long readBytesFromFileChannel(FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes) throws IOException
Reads data into this memory object for a certain position of a file channel.- Parameters:
pFileChannel- file channelpFilePositionInBytes- offset in file channelpLengthInBytes- length in bytes- Returns:
- File position past the last byte read.
- Throws:
IOException- Thrown in case of IO problem.
-
readBytesFromFileChannel
long readBytesFromFileChannel(long pBufferPositionInBytes, FileChannel pFileChannel, long pFilePositionInBytes, long pLengthInBytes) throws IOException- Parameters:
pBufferPositionInBytes- offset in memory objectpFileChannel- file channelpFilePositionInBytes- offset in file channelpLengthInBytes- length in bytes- Returns:
- File position past the last byte read.
- Throws:
IOException- Thrown in case of IO problem.
-
-