class FileBase extends FileChannel {

    @Override
    public abstract long size() throws IOException;

    @Override
    public abstract long position() throws IOException;

    @Override
    public abstract FileChannel position(long newPosition) throws IOException;

    @Override
    public abstract int read(ByteBuffer dst) throws IOException;

    @Override
    public abstract int write(ByteBuffer src) throws IOException;

    @Override
    public synchronized int read(ByteBuffer dst, long position) throws IOException {
        long oldPos = position();
        position(position);
        int len = read(dst);
        position(oldPos);
        return len;
    }

    @Override
    public synchronized int write(ByteBuffer src, long position) throws IOException {<FILL_FUNCTION_BODY>}

    @Override
    public abstract FileChannel truncate(long size) throws IOException;

    @Override
    public void force(boolean metaData) throws IOException {
        // ignore
    }

    @Override
    protected void implCloseChannel() throws IOException {
        // ignore
    }

    @Override
    public FileLock lock(long position, long size, boolean shared) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public MappedByteBuffer map(MapMode mode, long position, long size) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public long read(ByteBuffer[] dsts, int offset, int length) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public long transferFrom(ReadableByteChannel src, long position, long count) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public long transferTo(long position, long count, WritableByteChannel target) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public FileLock tryLock(long position, long size, boolean shared) throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public long write(ByteBuffer[] srcs, int offset, int length) throws IOException {
        throw new UnsupportedOperationException();
    }
}

        long oldPos = position();
        position(position);
        int len = write(src);
        position(oldPos);
        return len;
    
<methods>public abstract void force(boolean) throws java.io.IOException,public final java.nio.channels.FileLock lock() throws java.io.IOException,public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOException,public abstract java.nio.MappedByteBuffer map(java.nio.channels.FileChannel.MapMode, long, long) throws java.io.IOException,public static transient java.nio.channels.FileChannel open(java.nio.file.Path, java.nio.file.OpenOption[]) throws java.io.IOException,public static transient java.nio.channels.FileChannel open(java.nio.file.Path, Set<? extends java.nio.file.OpenOption>, FileAttribute<?>[]) throws java.io.IOException,public abstract long position() throws java.io.IOException,public abstract java.nio.channels.FileChannel position(long) throws java.io.IOException,public abstract int read(java.nio.ByteBuffer) throws java.io.IOException,public final long read(java.nio.ByteBuffer[]) throws java.io.IOException,public abstract int read(java.nio.ByteBuffer, long) throws java.io.IOException,public abstract long read(java.nio.ByteBuffer[], int, int) throws java.io.IOException,public abstract long size() throws java.io.IOException,public abstract long transferFrom(java.nio.channels.ReadableByteChannel, long, long) throws java.io.IOException,public abstract long transferTo(long, long, java.nio.channels.WritableByteChannel) throws java.io.IOException,public abstract java.nio.channels.FileChannel truncate(long) throws java.io.IOException,public final java.nio.channels.FileLock tryLock() throws java.io.IOException,public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOException,public abstract int write(java.nio.ByteBuffer) throws java.io.IOException,public final long write(java.nio.ByteBuffer[]) throws java.io.IOException,public abstract int write(java.nio.ByteBuffer, long) throws java.io.IOException,public abstract long write(java.nio.ByteBuffer[], int, int) throws java.io.IOException<variables>private static final FileAttribute<?>[] NO_ATTRIBUTES