Class Overview
A memory-resident IndexOutput
implementation.
For Lucene internal use.
Summary
Public Methods |
void
|
close()
Closes this stream to further operations.
|
void
|
flush()
Forces any buffered output to be written.
|
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
|
reset()
Resets this to an empty file.
|
void
|
seek(long pos)
Sets current position in this file, where the next write will occur.
|
long
|
sizeInBytes()
Returns byte usage of all buffers.
|
void
|
writeByte(byte b)
Writes a single byte.
|
void
|
writeBytes(byte[] b, int offset, int len)
Writes an array of bytes.
|
void
|
writeTo(IndexOutput out)
Copy the current contents of this buffer to the named output.
|
[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
RAMOutputStream
()
Construct an empty output buffer.
Public Methods
public
void
close
()
Closes this stream to further operations.
public
void
flush
()
Forces any buffered output to be written.
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
reset
()
Resets this to an empty file.
public
void
seek
(long pos)
Sets current position in this file, where the next write will occur.
public
long
sizeInBytes
()
Returns byte usage of all buffers.
public
void
writeByte
(byte b)
public
void
writeBytes
(byte[] b, int offset, int len)
Writes an array of bytes.
Parameters
b
| the bytes to write |
offset
| the offset in the byte array |
len
| the number of bytes to write |
public
void
writeTo
(IndexOutput out)
Copy the current contents of this buffer to the named output.