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

WriteOnlyFileChannel

public final class WriteOnlyFileChannel extends FileChannelImpl

Fields Summary
private boolean
append
Constructors Summary
public WriteOnlyFileChannel(Object stream, int handle)


         
        super(stream, handle);
    
public WriteOnlyFileChannel(Object stream, int handle, boolean isAppend)

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

        if (shared) {
            throw new NonReadableChannelException();
        }
        return super.basicLock(position, size, shared, wait);
    
public 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();
        }
        throw new NonReadableChannelException();
    
public longposition()

        return append ? size() : super.position();
    
public longread(java.nio.ByteBuffer[] buffers, int offset, int length)

        
        if (offset < 0 || length < 0 || offset + length > buffers.length) {
            throw new IndexOutOfBoundsException();
        }
        openCheck();
        throw new NonReadableChannelException();
    
public intread(java.nio.ByteBuffer buffer)

        openCheck();
        throw new NonReadableChannelException();
    
public intread(java.nio.ByteBuffer buffer, long position)

        
        if (null == buffer) {
            throw new NullPointerException();
        }
        if (position < 0){
            throw new IllegalArgumentException();
        }
        throw new NonReadableChannelException();
    
public longtransferTo(long position, long count, java.nio.channels.WritableByteChannel target)

        openCheck();
        if (!target.isOpen()) {
            throw new ClosedChannelException();
        }
        throw new NonReadableChannelException();
    
public intwrite(java.nio.ByteBuffer buffer)

        if (append) {
            position(size());
        }
        return super.write(buffer);