Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Protected Member Functions | Properties | List of all members
Lucene.Net.Store.IndexOutput Class Referenceabstract

Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations. More...

Inherits IDisposable.

Inherited by Lucene.Net.Store.BufferedIndexOutput, Lucene.Net.Store.ChecksumIndexOutput, and Lucene.Net.Store.RAMOutputStream.

Public Member Functions

abstract void WriteByte (byte b)
 Writes a single byte.
 
virtual void WriteBytes (byte[] b, int length)
 Writes an array of bytes.
 
abstract void WriteBytes (byte[] b, int offset, int length)
 Writes an array of bytes.
 
virtual void WriteInt (int i)
 Writes an int as four bytes.
 
virtual void WriteVInt (int i)
 Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 
virtual void WriteLong (long i)
 Writes a long as eight bytes.
 
virtual void WriteVLong (long i)
 Writes an long in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 
virtual void WriteString (System.String s)
 Writes a string.
 
virtual void WriteChars (System.String s, int start, int length)
 Writes a sub sequence of characters from s as the old format (modified UTF-8 encoded bytes).
 
virtual void WriteChars (char[] s, int start, int length)
 Writes a sub sequence of characters from char[] as the old format (modified UTF-8 encoded bytes).
 
virtual void CopyBytes (IndexInput input, long numBytes)
 Copy numBytes bytes from input to ourself.
 
abstract void Flush ()
 Forces any buffered output to be written.
 
void Close ()
 Closes this stream to further operations.
 
void Dispose ()
 Closes this stream to further operations.
 
abstract void Seek (long pos)
 Sets current position in this file, where the next write will occur.
 
virtual void SetLength (long length)
 Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for
 
virtual void WriteStringStringMap (System.Collections.Generic.IDictionary< string, string > map)
 

Protected Member Functions

abstract void Dispose (bool disposing)
 

Properties

abstract long FilePointer [get]
 Returns the current position in this file, where the next write will occur.
 
abstract long Length [get]
 The number of bytes in the file.
 

Detailed Description

Abstract base class for output to a file in a Directory. A random-access output stream. Used for all Lucene index output operations.

See Also
Directory
See Also
IndexInput

Definition at line 32 of file IndexOutput.cs.

Member Function Documentation

void Lucene.Net.Store.IndexOutput.Close ( )

Closes this stream to further operations.

Definition at line 222 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.CopyBytes ( IndexInput  input,
long  numBytes 
)
virtual

Copy numBytes bytes from input to ourself.

Definition at line 198 of file IndexOutput.cs.

void Lucene.Net.Store.IndexOutput.Dispose ( )

Closes this stream to further operations.

Definition at line 228 of file IndexOutput.cs.

abstract void Lucene.Net.Store.IndexOutput.Dispose ( bool  disposing)
protectedpure virtual
abstract void Lucene.Net.Store.IndexOutput.Flush ( )
pure virtual
abstract void Lucene.Net.Store.IndexOutput.Seek ( long  pos)
pure virtual
virtual void Lucene.Net.Store.IndexOutput.SetLength ( long  length)
virtual

Set the file length. By default, this method does nothing (it's optional for a Directory to implement it). But, certain Directory implementations (for

See Also
FSDirectory

can use this to inform the underlying IO system to pre-allocate the file to the specified size. If the length is longer than the current file length, the bytes added to the file are undefined. Otherwise the file is truncated.

Parameters
lengthfile length

Reimplemented in Lucene.Net.Store.SimpleFSDirectory.SimpleFSIndexOutput.

Definition at line 262 of file IndexOutput.cs.

abstract void Lucene.Net.Store.IndexOutput.WriteByte ( byte  b)
pure virtual
virtual void Lucene.Net.Store.IndexOutput.WriteBytes ( byte[]  b,
int  length 
)
virtual

Writes an array of bytes.

Parameters
bthe bytes to write
lengththe number of bytes to write
See Also
IndexInput.ReadBytes(byte[],int,int)

Definition at line 46 of file IndexOutput.cs.

abstract void Lucene.Net.Store.IndexOutput.WriteBytes ( byte[]  b,
int  offset,
int  length 
)
pure virtual

Writes an array of bytes.

Parameters
bthe bytes to write
offsetthe offset in the byte array
lengththe number of bytes to write
See Also
IndexInput.ReadBytes(byte[],int,int)

Implemented in Lucene.Net.Store.RAMOutputStream, Lucene.Net.Store.BufferedIndexOutput, and Lucene.Net.Store.ChecksumIndexOutput.

virtual void Lucene.Net.Store.IndexOutput.WriteChars ( System.String  s,
int  start,
int  length 
)
virtual

Writes a sub sequence of characters from s as the old format (modified UTF-8 encoded bytes).

Parameters
sthe source of the characters
startthe first character in the sequence
lengththe number of characters in the sequence

<deprecated> – please pre-convert to utf8 bytes instead or use WriteString </deprecated>

Definition at line 138 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteChars ( char[]  s,
int  start,
int  length 
)
virtual

Writes a sub sequence of characters from char[] as the old format (modified UTF-8 encoded bytes).

Parameters
sthe source of the characters
startthe first character in the sequence
lengththe number of characters in the sequence

<deprecated> – please pre-convert to utf8 bytes instead or use WriteString </deprecated>

Definition at line 172 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteInt ( int  i)
virtual

Writes an int as four bytes.

See Also
IndexInput.ReadInt()

Definition at line 65 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteLong ( long  i)
virtual

Writes a long as eight bytes.

See Also
IndexInput.ReadLong()

Definition at line 92 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteString ( System.String  s)
virtual

Writes a string.

See Also
IndexInput.ReadString()

Definition at line 117 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteStringStringMap ( System.Collections.Generic.IDictionary< string, string >  map)
virtual

Definition at line 268 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteVInt ( int  i)
virtual

Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

See Also
IndexInput.ReadVInt()

Definition at line 79 of file IndexOutput.cs.

virtual void Lucene.Net.Store.IndexOutput.WriteVLong ( long  i)
virtual

Writes an long in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.

See Also
IndexInput.ReadVLong()

Definition at line 104 of file IndexOutput.cs.

Property Documentation

abstract long Lucene.Net.Store.IndexOutput.FilePointer
get

Returns the current position in this file, where the next write will occur.

See Also
Seek(long)

Definition at line 240 of file IndexOutput.cs.

abstract long Lucene.Net.Store.IndexOutput.Length
get

The number of bytes in the file.

Definition at line 248 of file IndexOutput.cs.


The documentation for this class was generated from the following file: