Code example for FileChannel

Methods: position, write

0
    public int write(ByteBuffer buf) {
        checkClosed(); 
        checkWritable(); 
        try { 
            return !emulateAppend ? fileChannel.write(buf) :
                    fileChannel.write(buf, fileChannel.position());
        } catch (IOException ioe) {
            throw Py.IOError(ioe);
        } 
    } 
 
    /** 
     * Write bytes from each of the specified ByteBuffers via gather 
     * i/o. 
     * 
     * @param bufs {@inheritDoc} 
     * @return {@inheritDoc} 
     */ 
    @Override 
    public long write(ByteBuffer[] bufs) {
        checkClosed();