//
import java.io.*;

public class FichierEntierAccesDirect  {
  private static final int taille=4; //taille d'un entier
  protected RandomAccessFile f;
  public FichierEntierAccesDirect(File  file, String  mode)
  throws IOException
    {f=new RandomAccessFile(file, mode);}
     
  public FichierEntierAccesDirect(String  name, String  mode)
  throws IOException
  	{f=new RandomAccessFile(name,mode);}
  
  public void close() throws IOException
  {f.close();}
   
  public int read() throws IOException
  {return f.readInt();}
	
  void write(int  v) throws IOException  
  {f.writeInt(v);}
  
  void seek(long  pos) throws IOException
  {f.seek(taille*pos);};
	
  public long getFilePointer() throws IOException
   { return f.getFilePointer() / taille;}

  public long length() throws IOException
   { return f.length() / taille;}
  
}