public abstract class FileBaseDefault extends FileBase
| Constructor and Description |
|---|
FileBaseDefault() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
implTruncate(long size)
The truncate implementation.
|
long |
position() |
java.nio.channels.FileChannel |
position(long newPosition) |
int |
read(java.nio.ByteBuffer dst) |
java.nio.channels.FileChannel |
truncate(long newLength) |
int |
write(java.nio.ByteBuffer src) |
force, implCloseChannel, lock, map, read, read, transferFrom, transferTo, tryLock, write, writelock, open, open, read, size, tryLock, writebegin, close, end, isOpenpublic final long position()
throws java.io.IOException
position in interface java.nio.channels.SeekableByteChannelposition in class java.nio.channels.FileChanneljava.io.IOExceptionpublic final java.nio.channels.FileChannel position(long newPosition)
throws java.io.IOException
position in interface java.nio.channels.SeekableByteChannelposition in class java.nio.channels.FileChanneljava.io.IOExceptionpublic final int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChannelread in interface java.nio.channels.SeekableByteChannelread in class java.nio.channels.FileChanneljava.io.IOExceptionpublic final int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.SeekableByteChannelwrite in interface java.nio.channels.WritableByteChannelwrite in class java.nio.channels.FileChanneljava.io.IOExceptionpublic final java.nio.channels.FileChannel truncate(long newLength)
throws java.io.IOException
truncate in interface java.nio.channels.SeekableByteChanneltruncate in class java.nio.channels.FileChanneljava.io.IOExceptionprotected abstract void implTruncate(long size)
throws java.io.IOException
size - the new sizejava.io.IOException - on failure