Home » lucene-3.0.1-src » org.apache » lucene » store » [javadoc | source]
org.apache.lucene.store
abstract public class: IndexOutput [javadoc | source]
java.lang.Object
   org.apache.lucene.store.IndexOutput

All Implemented Interfaces:
    Closeable

Direct Known Subclasses:
    BufferedIndexOutput, ChecksumIndexOutput, DbIndexOutput, SimpleFSIndexOutput, RAMOutputStream, JEIndexOutput

Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.
Method from org.apache.lucene.store.IndexOutput Summary:
close,   copyBytes,   flush,   getFilePointer,   length,   seek,   setLength,   writeByte,   writeBytes,   writeBytes,   writeChars,   writeChars,   writeInt,   writeLong,   writeString,   writeStringStringMap,   writeVInt,   writeVLong
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.store.IndexOutput Detail:
 abstract public  void close() throws IOException
    Closes this stream to further operations.
 public  void copyBytes(IndexInput input,
    long numBytes) throws IOException 
    Copy numBytes bytes from input to ourself.
 abstract public  void flush() throws IOException
    Forces any buffered output to be written.
 abstract public long getFilePointer()
    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.
 abstract public  void seek(long pos) throws IOException
    Sets current position in this file, where the next write will occur.
 public  void setLength(long length) throws IOException 
    Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for example @see FSDirectory) can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.
 abstract public  void writeByte(byte b) throws IOException
    Writes a single byte.
 public  void writeBytes(byte[] b,
    int length) throws IOException 
    Writes an array of bytes.
 abstract public  void writeBytes(byte[] b,
    int offset,
    int length) throws IOException
    Writes an array of bytes.
 public  void writeChars(String s,
    int start,
    int length) throws IOException 
Deprecated! -- - please pre-convert to utf8 bytes instead or use #writeString

    Writes a sub sequence of characters from s as the old format (modified UTF-8 encoded bytes).
 public  void writeChars(char[] s,
    int start,
    int length) throws IOException 
Deprecated! -- - please pre-convert to utf8 bytes instead or use #writeString

    Writes a sub sequence of characters from char[] as the old format (modified UTF-8 encoded bytes).
 public  void writeInt(int i) throws IOException 
    Writes an int as four bytes.
 public  void writeLong(long i) throws IOException 
    Writes a long as eight bytes.
 public  void writeString(String s) throws IOException 
    Writes a string.
 public  void writeStringStringMap(Map<String, String> map) throws IOException 
 public  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  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.