Code example for RandomAccessFile

Methods: seekwriteInt

0
     * args: x, z, offset - sets the chunk's offset in the region file 
     */ 
    private void setOffset(int par1, int par2, int par3) throws IOException   // CraftBukkit - added throws
    { 
        this.offsets[par1 + par2 * 32] = par3;
        this.dataFile.seek((long)((par1 + par2 * 32) * 4));
        this.dataFile.writeInt(par3);
    } 
 
    /** 
     * args: x, z, timestamp - sets the chunk's write timestamp 
     */ 
    private void setChunkTimestamp(int par1, int par2, int par3) throws IOException   // CraftBukkit - added throws
    { 
        this.chunkTimestamps[par1 + par2 * 32] = par3;
        this.dataFile.seek((long)(4096 + (par1 + par2 * 32) * 4));
        this.dataFile.writeInt(par3);
    } 
 
    /**