java.lang.Object | |
↳ | org.apache.lucene.store.IndexOutput |
Known Direct Subclasses |
Known Indirect Subclasses |
Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes this stream to further operations.
| |||||||||||
Copy numBytes bytes from input to ourself.
| |||||||||||
Forces any buffered output to be written.
| |||||||||||
Returns the current position in this file, where the next write will
occur.
| |||||||||||
The number of bytes in the file.
| |||||||||||
Sets current position in this file, where the next write will occur.
| |||||||||||
Set the file length.
| |||||||||||
Writes a single byte.
| |||||||||||
Writes an array of bytes.
| |||||||||||
Writes an array of bytes.
| |||||||||||
This method is deprecated.
-- please pre-convert to utf8 bytes instead or use
writeString(String)
| |||||||||||
This method is deprecated.
-- please pre-convert to utf8 bytes
instead or use
writeString(String)
| |||||||||||
Writes an int as four bytes.
| |||||||||||
Writes a long as eight bytes.
| |||||||||||
Writes a string.
| |||||||||||
Writes an int in a variable-length format.
| |||||||||||
Writes an long in a variable-length format.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.io.Closeable
|
Copy numBytes bytes from input to ourself.
IOException |
---|
Returns the current position in this file, where the next write will occur.
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.
length | file length |
---|
IOException |
---|
Writes an array of bytes.
b | the bytes to write |
---|---|
offset | the offset in the byte array |
length | the number of bytes to write |
IOException |
---|
Writes an array of bytes.
b | the bytes to write |
---|---|
length | the number of bytes to write |
IOException |
---|
This method is deprecated.
-- please pre-convert to utf8 bytes instead or use writeString(String)
Writes a sub sequence of characters from char[] as the old format (modified UTF-8 encoded bytes).
s | the source of the characters |
---|---|
start | the first character in the sequence |
length | the number of characters in the sequence |
IOException |
---|
This method is deprecated.
-- please pre-convert to utf8 bytes
instead or use writeString(String)
Writes a sub sequence of characters from s as the old format (modified UTF-8 encoded bytes).
s | the source of the characters |
---|---|
start | the first character in the sequence |
length | the number of characters in the sequence |
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.
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.
IOException |
---|