use of org.apache.lucene.store.IndexOutput in project jackrabbit-oak by apache.
the class BufferedOakDirectoryTest method writeFile.
private byte[] writeFile(Directory dir, String name) throws IOException {
byte[] data = randomBytes(rnd.nextInt((int) (16 * FileUtils.ONE_KB)));
IndexOutput out = dir.createOutput(name, IOContext.DEFAULT);
out.writeBytes(data, data.length);
out.close();
return data;
}
use of org.apache.lucene.store.IndexOutput in project jackrabbit-oak by apache.
the class OakDirectoryTest method createFile.
private int createFile(Directory dir, String fileName) throws IOException {
int size = rnd.nextInt(1000) + 1;
byte[] data = randomBytes(size);
IndexOutput o = dir.createOutput(fileName, IOContext.DEFAULT);
o.writeBytes(data, data.length);
o.close();
return size;
}
use of org.apache.lucene.store.IndexOutput in project jackrabbit-oak by apache.
the class IndexCopierTest method writeFile.
private byte[] writeFile(Directory dir, String name) throws IOException {
byte[] data = randomBytes(rnd.nextInt(maxFileSize) + 1);
IndexOutput o = dir.createOutput(name, IOContext.DEFAULT);
o.writeBytes(data, data.length);
o.close();
return data;
}
use of org.apache.lucene.store.IndexOutput in project jackrabbit-oak by apache.
the class LuceneIndexDumperTest method createFile.
private int createFile(Directory dir, String fileName, String content) throws IOException {
byte[] data = content.getBytes();
IndexOutput o = dir.createOutput(fileName, IOContext.DEFAULT);
o.writeBytes(data, data.length);
o.close();
return data.length;
}
use of org.apache.lucene.store.IndexOutput in project jackrabbit-oak by apache.
the class IndexSanityCheckerTest method writeFile.
private void writeFile(Directory dir, String name, byte[] data) throws IOException {
IndexOutput o = dir.createOutput(name, IOContext.DEFAULT);
o.writeBytes(data, data.length);
o.close();
}
Aggregations