Java Annotation Indexer 1.0.0.Final

org.jboss.jandex
Class IndexWriter

java.lang.Object
  extended by org.jboss.jandex.IndexWriter

public final class IndexWriter
extends Object

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.

Author:
Jason T. Greene
See Also:
Indexer, Index

Constructor Summary
IndexWriter(OutputStream out)
          Constructs an IndexWriter using the specified stream
 
Method Summary
 int write(Index index)
          Writes the specified index to the associated output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexWriter

public IndexWriter(OutputStream out)
Constructs an IndexWriter using the specified stream

Parameters:
out - a stream to write an index to
Method Detail

write

public int write(Index index)
          throws IOException
Writes the specified index to the associated output stream. This may be called multiple times in order to write multiple indexes.

Parameters:
index - the index to write to the stream
Returns:
the number of bytes written to the stream
Throws:
IOException - if any i/o error occurs

Java Annotation Indexer 1.0.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.