Search in sources :

Example 1 with FileBlob

use of org.apache.jackrabbit.oak.segment.file.FileBlob in project jackrabbit-oak by apache.

the class ExternalBlobIT method getFileBlob.

private FileBlob getFileBlob() throws IOException {
    if (fileBlob == null) {
        File file = folder.newFile();
        byte[] data = new byte[2345];
        new Random().nextBytes(data);
        FileUtils.writeByteArrayToFile(file, data);
        fileBlob = new FileBlob(file.getPath());
    }
    return fileBlob;
}
Also used : FileBlob(org.apache.jackrabbit.oak.segment.file.FileBlob) Random(java.util.Random) File(java.io.File)

Aggregations

File (java.io.File)1 Random (java.util.Random)1 FileBlob (org.apache.jackrabbit.oak.segment.file.FileBlob)1