public abstract class IndexOutput extends Object
Directory,
IndexInput| Constructor and Description |
|---|
IndexOutput() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close()
Closes this stream to further operations.
|
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.
|
abstract void |
writeBytes(byte[] b,
int length)
Writes an array of bytes.
|
void |
writeChars(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(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.
|
public abstract void writeByte(byte b)
throws IOException
IOExceptionIndexInput.readByte()public abstract void writeBytes(byte[] b,
int length)
throws IOException
b - the bytes to writelength - the number of bytes to writeIOExceptionIndexInput.readBytes(byte[],int,int)public void writeInt(int i)
throws IOException
IOExceptionIndexInput.readInt()public void writeVInt(int i)
throws IOException
IOExceptionIndexInput.readVInt()public void writeLong(long i)
throws IOException
IOExceptionIndexInput.readLong()public void writeVLong(long i)
throws IOException
IOExceptionIndexInput.readVLong()public void writeString(String s) throws IOException
IOExceptionIndexInput.readString()public void writeChars(String s, int start, int length) throws IOException
s - the source of the charactersstart - the first character in the sequencelength - the number of characters in the sequenceIOExceptionIndexInput.readChars(char[],int,int)public abstract void flush()
throws IOException
IOExceptionpublic abstract void close()
throws IOException
IOExceptionpublic abstract long getFilePointer()
seek(long)public abstract void seek(long pos)
throws IOException
IOExceptiongetFilePointer()public abstract long length()
throws IOException
IOExceptionCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.