Java 类com.intellij.util.io.storage.Storage 实例源码

项目:intellij-ce-playground    文件:CompactStorageTest.java   
static  int createTestRecord(Storage storage) throws IOException {
  final int r = storage.createNewRecord();

  DataOutputStream out = new DataOutputStream(storage.appendStream(r));
  try {
    Random random = new Random(r);
    for (int i = 0; i < TIMES_LIMIT; i++) {
      out.writeInt(random.nextInt());
    }
  }
  finally {
    out.close();
  }

  return r;
}
项目:intellij-ce-playground    文件:CompactStoragePerformanceTest.java   
@NotNull
@Override
protected Storage createStorage(String fileName) throws IOException {
  return new CompactStorageTest.CompactStorage(fileName);
}
项目:intellij-ce-playground    文件:CompactStorageTest.java   
@NotNull
@Override
protected Storage createStorage(String fileName) throws IOException {
  return new CompactStorage(fileName);
}