Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » store » [javadoc | source]
org.apache.lucene.store
abstract public class: OutputStream [javadoc | source]
java.lang.Object
   org.apache.lucene.store.OutputStream
Abstract class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.
Field Summary
static final  int BUFFER_SIZE     
Method from org.apache.lucene.store.OutputStream Summary:
close,   flush,   flushBuffer,   getFilePointer,   length,   seek,   writeByte,   writeBytes,   writeChars,   writeInt,   writeLong,   writeString,   writeVInt,   writeVLong
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.store.OutputStream Detail:
 public  void close() throws IOException 
    Closes this stream to further operations.
 protected final  void flush() throws IOException 
    Forces any buffered output to be written.
 abstract protected  void flushBuffer(byte[] b,
    int len) throws IOException
    Expert: implements buffer write. Writes bytes at the current position in the output.
 public final long getFilePointer() throws IOException 
    Returns the current position in this file, where the next write will occur.
 abstract public long length() throws IOException
    The number of bytes in the file.
 public  void seek(long pos) throws IOException 
    Sets current position in this file, where the next write will occur.
 public final  void writeByte(byte b) throws IOException 
    Writes a single byte.
 public final  void writeBytes(byte[] b,
    int length) throws IOException 
    Writes an array of bytes.
 public final  void writeChars(String s,
    int start,
    int length) throws IOException 
    Writes a sequence of UTF-8 encoded characters from a string.
 public final  void writeInt(int i) throws IOException 
    Writes an int as four bytes.
 public final  void writeLong(long i) throws IOException 
    Writes a long as eight bytes.
 public final  void writeString(String s) throws IOException 
    Writes a string.
 public final  void writeVInt(int i) throws IOException 
    Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 public final  void writeVLong(long i) throws IOException 
    Writes an long in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.