Code example for FileChannel

Methods: positionsize

0
     */ 
    DataFile(final File file, final int number, final boolean force) throws IOException {
        this.file = file;
        this.fc = new RandomAccessFile(file, force ? "rws" : "rw").getChannel();
        // Ö¸ÕëÒƵ½×îºó 
        this.fc.position(this.fc.size());
        this.currentPos = this.fc.position();
        this.number = number;
    } 
 
 
    int getNumber() { 
        return this.number;
    } 
 
 
    /** 
     * »ñµÃÎļþµÄ´óС 
     *  
     * @return ÎļþµÄ´óС 
Contextual code suggestions in your IDE  Get Codota for Java