Example usage for org.apache.lucene.store OutputStreamIndexOutput OutputStreamIndexOutput

List of usage examples for org.apache.lucene.store OutputStreamIndexOutput OutputStreamIndexOutput

Introduction

In this page you can find the example usage for org.apache.lucene.store OutputStreamIndexOutput OutputStreamIndexOutput.

Prototype

public OutputStreamIndexOutput(String resourceDescription, String name, OutputStream out, int bufferSize) 

Source Link

Document

Creates a new OutputStreamIndexOutput with the given buffer size.

Usage

From source file:org.apache.geode.cache.lucene.internal.directory.RegionDirectory.java

License:Apache License

@Override
public IndexOutput createOutput(final String name, final IOContext context) throws IOException {
    ensureOpen();// ww w. java2s .c o m
    final File file = fs.createFile(name);
    final OutputStream out = file.getOutputStream();

    return new OutputStreamIndexOutput(name, name, out, 1000);
}

From source file:org.apache.geode.cache.lucene.internal.directory.RegionDirectory.java

License:Apache License

public IndexOutput createTempOutput(String prefix, String suffix, IOContext context) throws IOException {
    String name = prefix + "_temp_" + UUID.randomUUID() + suffix;
    final File file = fs.createTemporaryFile(name);
    final OutputStream out = file.getOutputStream();

    return new OutputStreamIndexOutput(name, name, out, 1000);
}