| java.lang.Object org.apache.lucene.store.IndexOutput
All known Subclasses: org.apache.lucene.store.BufferedIndexOutput, org.apache.lucene.store.RAMOutputStream, org.apache.lucene.store.je.JEIndexOutput, org.apache.lucene.store.db.DbIndexOutput,
IndexOutput | abstract public class IndexOutput (Code) | | Abstract base class for output to a file in a Directory. A random-access
output stream. Used for all Lucene index output operations.
See Also: Directory See Also: IndexInput |
Method Summary | |
abstract public void | close() Closes this stream to further operations. | public void | copyBytes(IndexInput input, long numBytes) Copy numBytes bytes from input to ourself. | abstract public void | flush() 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() The number of bytes in the file. | abstract public void | seek(long pos) Sets current position in this file, where the next write will occur. | abstract public void | writeByte(byte b) Writes a single byte. | public void | writeBytes(byte[] b, int length) Writes an array of bytes. | abstract public void | writeBytes(byte[] b, int offset, int length) Writes an array of bytes. | public void | writeChars(String s, int start, int length) Writes a sequence of UTF-8 encoded characters from a string. | public void | writeChars(char[] s, int start, int length) Writes a sequence of UTF-8 encoded characters from a char[]. | public void | writeInt(int i) Writes an int as four bytes. | public void | writeLong(long i) Writes a long as eight bytes. | public void | writeString(String s) Writes a string. | public void | writeVInt(int i) Writes an int in a variable-length format. | public void | writeVLong(long i) Writes an long in a variable-length format. |
close | abstract public void close() throws IOException(Code) | | Closes this stream to further operations.
|
flush | abstract public void flush() throws IOException(Code) | | Forces any buffered output to be written.
|
getFilePointer | abstract public long getFilePointer()(Code) | | Returns the current position in this file, where the next write will
occur.
See Also: IndexOutput.seek(long) |
length | abstract public long length() throws IOException(Code) | | The number of bytes in the file.
|
writeBytes | abstract public void writeBytes(byte[] b, int offset, int length) throws IOException(Code) | | Writes an array of bytes.
Parameters: b - the bytes to write Parameters: offset - the offset in the byte array Parameters: length - the number of bytes to write See Also: IndexInput.readBytes(byte[]intint) |
writeChars | public void writeChars(String s, int start, int length) throws IOException(Code) | | Writes a sequence of UTF-8 encoded characters from a string.
Parameters: s - the source of the characters Parameters: start - the first character in the sequence Parameters: length - the number of characters in the sequence See Also: IndexInput.readChars(char[]intint) |
writeChars | public void writeChars(char[] s, int start, int length) throws IOException(Code) | | Writes a sequence of UTF-8 encoded characters from a char[].
Parameters: s - the source of the characters Parameters: start - the first character in the sequence Parameters: length - the number of characters in the sequence See Also: IndexInput.readChars(char[]intint) |
writeVInt | public void writeVInt(int i) throws IOException(Code) | | Writes an int in a variable-length format. Writes between one and
five bytes. Smaller values take fewer bytes. Negative numbers are not
supported.
See Also: IndexInput.readVInt |
writeVLong | public void writeVLong(long i) throws IOException(Code) | | Writes an long in a variable-length format. Writes between one and five
bytes. Smaller values take fewer bytes. Negative numbers are not
supported.
See Also: IndexInput.readVLong |
|
|