congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
IndexWriter
Code IndexAdd Tabnine to your IDE (free)

How to use
IndexWriter
in
org.jboss.jandex

Best Java code snippets using org.jboss.jandex.IndexWriter (Showing top 7 results out of 315)

origin: wildfly/jandex

/**
 * Writes the specified index to the associated output stream. This may be called multiple times in order
 * to write multiple indexes. The default version of index file is used.
 *
 * @param index the index to write to the stream
 * @return the number of bytes written to the stream
 * @throws IOException if the underlying stream fails
 */
public int write(Index index) throws IOException {
  return write(index, IndexWriterV2.MAX_VERSION);
}
origin: wildfly/jandex

private Result indexDirectory(File source, Indexer indexer) throws FileNotFoundException, IOException {
  File outputFile = this.outputFile;
  scanFile(source, indexer);
  if (modify) {
    new File(source, "META-INF").mkdirs();
    outputFile = new File(source, "META-INF/jandex.idx");
  }
  if (outputFile == null) {
    outputFile = new File(source.getName().replace('.', '-') + ".idx");
  }
  FileOutputStream out = new FileOutputStream(outputFile);
  IndexWriter writer = new IndexWriter(out);
  try {
    Index index = indexer.complete();
    int bytes = writer.write(index);
    return new Result(index, outputFile.getPath(), bytes, outputFile);
  } finally {
    out.flush();
    out.close();
  }
}
origin: wildfly/jandex

/**
 * Writes the specified index to the associated output stream. This may be called multiple times in order
 * to write multiple indexes.
 *
 * @param index the index to write to the stream
 * @param version the index file version
 * @return the number of bytes written to the stream
 * @throws IOException if any i/o error occurs
 */
public int write(Index index, int version) throws IOException {
  IndexWriterImpl writer = getWriter(version);
  if (writer == null) {
    throw new UnsupportedVersion("Version: " + version);
  }
  return writer.write(index, version);
}
origin: spring-projects/sts4

  IndexWriter writer = new IndexWriter(out);
  Index index = indexer.complete();
  writer.write(index);
  return index;
} catch (IOException e) {
origin: wildfly/jandex

IndexWriter writer = new IndexWriter(out);
Index index = indexer.complete();
int bytes = writer.write(index);
origin: wildfly/jandex

/**
 * Writes the specified index to the associated output stream. This may be called multiple times in order
 * to write multiple indexes.
 *
 * @param index the index to write to the stream
 * @param version the index file version
 * @return the number of bytes written to the stream
 * @throws IOException if any i/o error occurs
 */
@Deprecated
public int write(Index index, byte version) throws IOException {
  return this.write(index, version & 0xFF);
}
origin: wildfly/wildfly-core

IndexWriter writer = new IndexWriter(data);
writer.write(index);
org.jboss.jandexIndexWriter

Javadoc

Writes a Jandex index file to a stream. The write process is somewhat more expensive to allow for fast reads and a compact size. For more information on the index content, see the documentation on Indexer.

The IndexWriter operates on standard output streams, and also provides suitable buffering.

Thread-Safety

IndexWriter is not thread-safe and can not be shared between concurrent threads.

Most used methods

  • <init>
    Constructs an IndexWriter using the specified stream
  • write
    Writes the specified index to the associated output stream. This may be called multiple times in ord
  • getWriter

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JLabel (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now