public abstract class IndexOutput extends DataOutput implements Closeable
IndexOutput
may only be used from one thread, because it is not
thread safe (it keeps internal state like file position).
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.
|
void |
setLength(long length)
Set the file length.
|
copyBytes, writeByte, writeBytes, writeBytes, writeInt, writeLong, writeShort, writeString, writeStringSet, writeStringStringMap, writeVInt, writeVLong
public abstract void flush() throws IOException
IOException
public abstract void close() throws IOException
close
in interface Closeable
IOException
public abstract long getFilePointer()
seek(long)
public abstract void seek(long pos) throws IOException
IOException
getFilePointer()
public abstract long length() throws IOException
IOException
public void setLength(long length) throws IOException
length
- file lengthIOException
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.