Package xyz.cofe.io.fs
Class FChannelBuffer
- java.lang.Object
-
- xyz.cofe.cbuffer.SBCBuffer
-
- xyz.cofe.io.fs.FChannelBuffer
-
- All Implemented Interfaces:
AutoCloseable,xyz.cofe.cbuffer.ContentBuffer
public class FChannelBuffer extends xyz.cofe.cbuffer.SBCBufferФайловый буфер с использоавнием канала файла- Author:
- user
-
-
Constructor Summary
Constructors Constructor Description FChannelBuffer(FileChannel channel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()voidforce(boolean metaData)FileChannelgetFileChannel()FileLocklock()FileLocklock(long position, long size, boolean shared)MappedByteBuffermap(FileChannel.MapMode mode, long position, long size)static FChannelBufferopen(Path path, OpenOption... options)static FChannelBufferopen(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)static FChannelBufferopen(File file, OpenOption... options)static FChannelBufferopen(File file, Set<? extends OpenOption> options, FileAttribute<?>... attrs)longtransferFrom(ReadableByteChannel src, long position, long count)longtransferTo(long position, long count, WritableByteChannel target)FileLocktryLock()FileLocktryLock(long position, long size, boolean shared)
-
-
-
Constructor Detail
-
FChannelBuffer
public FChannelBuffer(FileChannel channel)
-
-
Method Detail
-
open
public static FChannelBuffer open(Path path, OpenOption... options)
-
open
public static FChannelBuffer open(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
-
open
public static FChannelBuffer open(File file, OpenOption... options)
-
open
public static FChannelBuffer open(File file, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
-
getFileChannel
public FileChannel getFileChannel()
-
lock
public FileLock lock()
-
lock
public FileLock lock(long position, long size, boolean shared)
-
tryLock
public FileLock tryLock()
-
tryLock
public FileLock tryLock(long position, long size, boolean shared)
-
force
public void force(boolean metaData)
-
flush
public void flush()
- Specified by:
flushin interfacexyz.cofe.cbuffer.ContentBuffer- Overrides:
flushin classxyz.cofe.cbuffer.SBCBuffer
-
map
public MappedByteBuffer map(FileChannel.MapMode mode, long position, long size)
-
transferFrom
public long transferFrom(ReadableByteChannel src, long position, long count)
-
transferTo
public long transferTo(long position, long count, WritableByteChannel target)
-
-