Class Overview
Writes bytes through to a primary IndexOutput, computing
checksum. Note that you cannot use seek().
Summary
Public Methods |
void
|
close()
Closes this stream to further operations.
|
void
|
finishCommit()
|
void
|
flush()
Forces any buffered output to be written.
|
long
|
getChecksum()
|
long
|
getFilePointer()
Returns the current position in this file, where the next write will
occur.
|
long
|
length()
The number of bytes in the file.
|
void
|
prepareCommit()
Starts but does not complete the commit of this file (=
writing of the final checksum at the end).
|
void
|
seek(long pos)
Sets current position in this file, where the next write will occur.
|
void
|
writeByte(byte b)
Writes a single byte.
|
void
|
writeBytes(byte[] b, int offset, int length)
Writes an array of bytes.
|
[Expand]
Inherited Methods |
From class
org.apache.lucene.store.IndexOutput
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.
|
void
|
setLength(long length)
Set the file length.
|
abstract
void
|
writeByte(byte b)
Writes a single byte.
|
abstract
void
|
writeBytes(byte[] b, int offset, int length)
Writes an array of bytes.
|
void
|
writeBytes(byte[] b, int length)
Writes an array of bytes.
|
void
|
writeChars(char[] s, int start, int length)
This method is deprecated.
-- please pre-convert to utf8 bytes instead or use writeString(String)
|
void
|
writeChars(String s, int start, int length)
This method is deprecated.
-- please pre-convert to utf8 bytes
instead or use writeString(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
|
writeStringStringMap(Map<String, String> map)
|
void
|
writeVInt(int i)
Writes an int in a variable-length format.
|
void
|
writeVLong(long i)
Writes an long in a variable-length format.
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
java.io.Closeable
|
Public Constructors
Public Methods
public
void
close
()
Closes this stream to further operations.
public
void
finishCommit
()
public
void
flush
()
Forces any buffered output to be written.
public
long
getChecksum
()
public
long
getFilePointer
()
Returns the current position in this file, where the next write will
occur.
public
long
length
()
The number of bytes in the file.
public
void
prepareCommit
()
Starts but does not complete the commit of this file (=
writing of the final checksum at the end). After this
is called must call finishCommit()
and the
close()
to complete the commit.
public
void
seek
(long pos)
Sets current position in this file, where the next write will occur.
public
void
writeByte
(byte b)
public
void
writeBytes
(byte[] b, int offset, int length)
Writes an array of bytes.
Parameters
b
| the bytes to write |
offset
| the offset in the byte array |
length
| the number of bytes to write |