org.apache.lucene.store
Class RAMOutputStream
- java.lang.Object
-
- org.apache.lucene.store.IndexOutput
-
- org.apache.lucene.store.RAMOutputStream
-
public class RAMOutputStream extends IndexOutput
A memory-residentIndexOutputimplementation.
-
-
Constructor Summary
Constructors Constructor and Description RAMOutputStream()Construct an empty output buffer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Closes this stream to further operations.voidflush()Forces any buffered output to be written.longgetFilePointer()Returns the current position in this file, where the next write will occur.longlength()The number of bytes in the file.voidreset()Resets this to an empty buffer.voidseek(long pos)Sets current position in this file, where the next write will occur.voidwriteByte(byte b)Writes a single byte.voidwriteBytes(byte[] b, int offset, int len)Writes an array of bytes.voidwriteTo(IndexOutput out)Copy the current contents of this buffer to the named output.-
Methods inherited from class org.apache.lucene.store.IndexOutput
copyBytes, writeBytes, writeChars, writeChars, writeInt, writeLong, writeString, writeVInt, writeVLong
-
-
-
-
Method Detail
-
writeTo
public void writeTo(IndexOutput out) throws java.io.IOException
Copy the current contents of this buffer to the named output.- Throws:
java.io.IOException
-
reset
public void reset()
Resets this to an empty buffer.
-
close
public void close() throws java.io.IOExceptionDescription copied from class:IndexOutputCloses this stream to further operations.- Specified by:
closein classIndexOutput- Throws:
java.io.IOException
-
seek
public void seek(long pos) throws java.io.IOExceptionDescription copied from class:IndexOutputSets current position in this file, where the next write will occur.- Specified by:
seekin classIndexOutput- Throws:
java.io.IOException- See Also:
IndexOutput.getFilePointer()
-
length
public long length()
Description copied from class:IndexOutputThe number of bytes in the file.- Specified by:
lengthin classIndexOutput
-
writeByte
public void writeByte(byte b) throws java.io.IOExceptionDescription copied from class:IndexOutputWrites a single byte.- Specified by:
writeBytein classIndexOutput- Throws:
java.io.IOException- See Also:
IndexInput.readByte()
-
writeBytes
public void writeBytes(byte[] b, int offset, int len) throws java.io.IOExceptionDescription copied from class:IndexOutputWrites an array of bytes.- Specified by:
writeBytesin classIndexOutput- Parameters:
b- the bytes to writeoffset- the offset in the byte arraylen- the number of bytes to write- Throws:
java.io.IOException- See Also:
IndexInput.readBytes(byte[],int,int)
-
flush
public void flush() throws java.io.IOExceptionDescription copied from class:IndexOutputForces any buffered output to be written.- Specified by:
flushin classIndexOutput- Throws:
java.io.IOException
-
getFilePointer
public long getFilePointer()
Description copied from class:IndexOutputReturns the current position in this file, where the next write will occur.- Specified by:
getFilePointerin classIndexOutput- See Also:
IndexOutput.seek(long)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG