Java 类com.intellij.util.io.RandomAccessDataFile 实例源码

项目:intellij-ce-playground    文件:DataTable.java   
public DataTable(final File filePath, final PagePool pool) throws IOException {
  myFile = new RandomAccessDataFile(filePath, pool);
  if (myFile.length() == 0) {
    markDirty();
  }
  else {
    readInHeader(filePath);
  }
}
项目:intellij-ce-playground    文件:AbstractRecordsTable.java   
public AbstractRecordsTable(final File storageFilePath, final PagePool pool) throws IOException {
  myStorage = new RandomAccessDataFile(storageFilePath, pool);
  if (myStorage.length() == 0) {
    myStorage.put(0, new byte[getHeaderSize()], 0, getHeaderSize());
    markDirty();
  }
  else {
    if (myStorage.getInt(HEADER_MAGIC_OFFSET) != getSafelyClosedMagic()) {
      myStorage.dispose();
      throw new IOException("Records table for '" + storageFilePath + "' haven't been closed correctly. Rebuild required.");
    }
  }
}
项目:tools-idea    文件:DataTable.java   
public DataTable(final File filePath, final PagePool pool) throws IOException {
  myFile = new RandomAccessDataFile(filePath, pool);
  if (myFile.length() == 0) {
    markDirty();
  }
  else {
    readInHeader(filePath);
  }
}
项目:tools-idea    文件:AbstractRecordsTable.java   
public AbstractRecordsTable(final File storageFilePath, final PagePool pool) throws IOException {
  myStorage = new RandomAccessDataFile(storageFilePath, pool);
  if (myStorage.length() == 0) {
    myStorage.put(0, new byte[getHeaderSize()], 0, getHeaderSize());
    markDirty();
  }
  else {
    if (myStorage.getInt(HEADER_MAGIC_OFFSET) != getSafelyClosedMagic()) {
      myStorage.dispose();
      throw new IOException("Records table for '" + storageFilePath + "' haven't been closed correctly. Rebuild required.");
    }
  }
}
项目:consulo    文件:DataTable.java   
public DataTable(final File filePath, final PagePool pool) throws IOException {
  myFile = new RandomAccessDataFile(filePath, pool);
  if (myFile.length() == 0) {
    markDirty();
  }
  else {
    readInHeader(filePath);
  }
}
项目:consulo    文件:AbstractRecordsTable.java   
public AbstractRecordsTable(final File storageFilePath, final PagePool pool) throws IOException {
  myStorage = new RandomAccessDataFile(storageFilePath, pool);
  if (myStorage.length() == 0) {
    myStorage.put(0, new byte[getHeaderSize()], 0, getHeaderSize());
    markDirty();
  }
  else {
    if (myStorage.getInt(HEADER_MAGIC_OFFSET) != getSafelyClosedMagic()) {
      myStorage.dispose();
      throw new IOException("Records table for '" + storageFilePath + "' haven't been closed correctly. Rebuild required.");
    }
  }
}