本文整理汇总了Java中com.intellij.util.io.storage.Storage类的典型用法代码示例。如果您正苦于以下问题:Java Storage类的具体用法?Java Storage怎么用?Java Storage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Storage类属于com.intellij.util.io.storage包,在下文中一共展示了Storage类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTestRecord
import com.intellij.util.io.storage.Storage; //导入依赖的package包/类
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;
}
示例2: createStorage
import com.intellij.util.io.storage.Storage; //导入依赖的package包/类
@NotNull
@Override
protected Storage createStorage(String fileName) throws IOException {
return new CompactStorageTest.CompactStorage(fileName);
}
示例3: createStorage
import com.intellij.util.io.storage.Storage; //导入依赖的package包/类
@NotNull
@Override
protected Storage createStorage(String fileName) throws IOException {
return new CompactStorage(fileName);
}