org.apache.jackrabbit.core.query.lucene.directory
Class IndexOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by org.apache.jackrabbit.core.query.lucene.directory.IndexOutputStream
All Implemented Interfaces:
Closeable, Flushable

public class IndexOutputStream
extends OutputStream

IndexOutputStream wraps an IndexOutput and exposes it as a regular OutputStream.


Constructor Summary
IndexOutputStream(org.apache.lucene.store.IndexOutput output)
          Creates a new index output stream and wraps the given output.
 
Method Summary
 void close()
          

Closes the underlying index output.

 void flush()
          

Flushes the underlying index output.

 void write(byte[] b, int off, int len)
          
 void write(int b)
          
 
Methods inherited from class java.io.OutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexOutputStream

public IndexOutputStream(org.apache.lucene.store.IndexOutput output)
                  throws IOException
Creates a new index output stream and wraps the given output. Bytes will always be written at the end of the output.

Parameters:
output - the lucene index output.
Throws:
IOException - if an error occurs while seeking to the end of the index output.
Method Detail

write

public void write(int b)
           throws IOException

Specified by:
write in class OutputStream
Throws:
IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException

Overrides:
write in class OutputStream
Throws:
IOException

flush

public void flush()
           throws IOException

Flushes the underlying index output.

Specified by:
flush in interface Flushable
Overrides:
flush in class OutputStream
Throws:
IOException

close

public void close()
           throws IOException

Closes the underlying index output.

Specified by:
close in interface Closeable
Overrides:
close in class OutputStream
Throws:
IOException


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.