|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.store.IndexOutput
public abstract class IndexOutput
Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.
Directory
,
IndexInput
Constructor Summary | |
---|---|
IndexOutput()
|
Method Summary | |
---|---|
abstract void |
close()
Closes this stream to further operations. |
void |
copyBytes(IndexInput input,
long numBytes)
Copy numBytes bytes from input to ourself. |
abstract void |
flush()
Forces any buffered output to be written. |
abstract long |
getFilePointer()
Returns the current position in this file, where the next write will occur. |
abstract long |
length()
The number of bytes in the file. |
abstract void |
seek(long pos)
Sets current position in this file, where the next write will occur. |
abstract void |
writeByte(byte b)
Writes a single byte. |
void |
writeBytes(byte[] b,
int length)
Writes an array of bytes. |
abstract void |
writeBytes(byte[] b,
int offset,
int length)
Writes an array of bytes. |
void |
writeChars(char[] s,
int start,
int length)
Writes a sequence of UTF-8 encoded characters from a char[]. |
void |
writeChars(java.lang.String s,
int start,
int length)
Writes a sequence of UTF-8 encoded characters from a string. |
void |
writeInt(int i)
Writes an int as four bytes. |
void |
writeLong(long i)
Writes a long as eight bytes. |
void |
writeString(java.lang.String s)
Writes a string. |
void |
writeVInt(int i)
Writes an int in a variable-length format. |
void |
writeVLong(long i)
Writes an long in a variable-length format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexOutput()
Method Detail |
---|
public abstract void writeByte(byte b) throws java.io.IOException
java.io.IOException
IndexInput.readByte()
public void writeBytes(byte[] b, int length) throws java.io.IOException
b
- the bytes to writelength
- the number of bytes to write
java.io.IOException
IndexInput.readBytes(byte[],int,int)
public abstract void writeBytes(byte[] b, int offset, int length) throws java.io.IOException
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to write
java.io.IOException
IndexInput.readBytes(byte[],int,int)
public void writeInt(int i) throws java.io.IOException
java.io.IOException
IndexInput.readInt()
public void writeVInt(int i) throws java.io.IOException
java.io.IOException
IndexInput.readVInt()
public void writeLong(long i) throws java.io.IOException
java.io.IOException
IndexInput.readLong()
public void writeVLong(long i) throws java.io.IOException
java.io.IOException
IndexInput.readVLong()
public void writeString(java.lang.String s) throws java.io.IOException
java.io.IOException
IndexInput.readString()
public void writeChars(java.lang.String s, int start, int length) throws java.io.IOException
s
- the source of the charactersstart
- the first character in the sequencelength
- the number of characters in the sequence
java.io.IOException
IndexInput.readChars(char[],int,int)
public void writeChars(char[] s, int start, int length) throws java.io.IOException
s
- the source of the charactersstart
- the first character in the sequencelength
- the number of characters in the sequence
java.io.IOException
IndexInput.readChars(char[],int,int)
public void copyBytes(IndexInput input, long numBytes) throws java.io.IOException
java.io.IOException
public abstract void flush() throws java.io.IOException
java.io.IOException
public abstract void close() throws java.io.IOException
java.io.IOException
public abstract long getFilePointer()
seek(long)
public abstract void seek(long pos) throws java.io.IOException
java.io.IOException
getFilePointer()
public abstract long length() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |