FileDocCategorySizeDatePackage
ReadOnlyFileChannel.javaAPI DocAndroid 1.5 API3759Wed May 06 22:41:04 BST 2009org.apache.harmony.nio.internal

ReadOnlyFileChannel

public final class ReadOnlyFileChannel extends FileChannelImpl

Fields Summary
Constructors Summary
public ReadOnlyFileChannel(Object stream, int handle)

        super(stream, handle);
    
Methods Summary
protected final java.nio.channels.FileLockbasicLock(long position, long size, boolean shared, boolean wait)

        if (!shared) {
            throw new NonWritableChannelException();
        }
        return super.basicLock(position, size, shared, true);
    
public final voidforce(boolean metadata)

        openCheck();
        return;
    
public final java.nio.MappedByteBuffermap(MapMode mode, long position, long size)

        openCheck();
        if (mode == null) {
            throw new NullPointerException();
        }
        if (position < 0 || size < 0 || size > Integer.MAX_VALUE) {
            throw new IllegalArgumentException();
        }
        if (mode != MapMode.READ_ONLY) {
            throw new NonWritableChannelException();
        }
        return super.mapImpl(IMemorySystem.MMAP_READ_ONLY, position, size);
    
public final longtransferFrom(java.nio.channels.ReadableByteChannel src, long position, long count)

        openCheck();
        if (!src.isOpen()) {
            throw new ClosedChannelException();
        }
        throw new NonWritableChannelException();
    
public final java.nio.channels.FileChanneltruncate(long size)

        openCheck();
        if (size < 0) {
            throw new IllegalArgumentException();
        }
        throw new NonWritableChannelException();
    
public final intwrite(java.nio.ByteBuffer buffer, long position)

        if (null == buffer){
            throw new NullPointerException();
        }
        if (position < 0){
            throw new IllegalArgumentException();
        }
        throw new NonWritableChannelException();
    
public final intwrite(java.nio.ByteBuffer buffer)

        openCheck();
        throw new NonWritableChannelException();
    
public final longwrite(java.nio.ByteBuffer[] buffers, int offset, int length)

        if (offset < 0 || length < 0 || (offset + length) > buffers.length) {
            throw new IndexOutOfBoundsException();
        }
        openCheck();
        throw new NonWritableChannelException();