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

ReadWriteFileChannel

public final class ReadWriteFileChannel extends FileChannelImpl

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

        super(stream, handle);
    
Methods Summary
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();
        }
        int mapMode;
        if (mode == MapMode.READ_ONLY) {
            mapMode = IMemorySystem.MMAP_READ_ONLY;
        } else if (mode == MapMode.READ_WRITE) {
            mapMode = IMemorySystem.MMAP_READ_WRITE;
        } else {
            mapMode = IMemorySystem.MMAP_WRITE_COPY;
        }
        return mapImpl(mapMode, position, size);