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.IndexInput Class Referenceabstract

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

Inherits ICloneable, and IDisposable.

Inherited by Lucene.Net.Store.BufferedIndexInput, Lucene.Net.Store.ChecksumIndexInput, Lucene.Net.Store.MMapDirectory.MMapIndexInput, Lucene.Net.Store.MMapDirectory.MultiMMapIndexInput, and Lucene.Net.Store.RAMInputStream.

Public Member Functions

abstract byte ReadByte ()
 Reads and returns a single byte.
 
abstract void ReadBytes (byte[] b, int offset, int len)
 Reads a specified number of bytes into an array at the specified offset.
 
virtual void ReadBytes (byte[] b, int offset, int len, bool useBuffer)
 Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.
 
virtual int ReadInt ()
 Reads four bytes and returns an int.
 
virtual int ReadVInt ()
 Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 
virtual long ReadLong ()
 Reads eight bytes and returns a long.
 
virtual long ReadVLong ()
 Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.
 
virtual void SetModifiedUTF8StringsMode ()
 Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding). This is used for indices written pre-2.4 See LUCENE-510 for details.
 
virtual System.String ReadString ()
 Reads a string.
 
virtual void ReadChars (char[] buffer, int start, int length)
 Reads Lucene's old "modified UTF-8" encoded characters into an array.
 
virtual void SkipChars (int length)
 Expert
 
void Close ()
 
void Dispose ()
 Closes the stream to futher operations.
 
abstract void Seek (long pos)
 Sets current position in this file, where the next read will occur.
 
abstract long Length ()
 The number of bytes in the file.
 
virtual System.Object Clone ()
 Returns a clone of this stream.
 
virtual
System.Collections.Generic.IDictionary
< string, string > 
ReadStringStringMap ()
 

Protected Member Functions

abstract void Dispose (bool disposing)
 

Properties

abstract long FilePointer [get]
 Returns the current position in this file, where the next read will occur.
 

Detailed Description

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

See Also
Directory

Definition at line 29 of file IndexInput.cs.

Member Function Documentation

virtual System.Object Lucene.Net.Store.IndexInput.Clone ( )
virtual

Returns a clone of this stream.

Clones of a stream access the same data, and are positioned at the same point as the stream they were cloned from.

Expert: Subclasses must ensure that clones may be positioned at different points in the input from each other and from the stream they were cloned from.

Reimplemented in Lucene.Net.Store.BufferedIndexInput.

Definition at line 259 of file IndexInput.cs.

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

Definition at line 222 of file IndexInput.cs.

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

Closes the stream to futher operations.

Definition at line 228 of file IndexInput.cs.

abstract void Lucene.Net.Store.IndexInput.Dispose ( bool  disposing)
protectedpure virtual
abstract long Lucene.Net.Store.IndexInput.Length ( )
pure virtual

The number of bytes in the file.

Implemented in Lucene.Net.Store.ChecksumIndexInput, and Lucene.Net.Store.RAMInputStream.

abstract byte Lucene.Net.Store.IndexInput.ReadByte ( )
pure virtual
abstract void Lucene.Net.Store.IndexInput.ReadBytes ( byte[]  b,
int  offset,
int  len 
)
pure virtual

Reads a specified number of bytes into an array at the specified offset.

Parameters
bthe array to read bytes into
offsetthe offset in the array to start storing bytes
lenthe number of bytes to read
See Also
IndexOutput.WriteBytes(byte[],int)

Implemented in Lucene.Net.Store.BufferedIndexInput, Lucene.Net.Store.RAMInputStream, and Lucene.Net.Store.ChecksumIndexInput.

virtual void Lucene.Net.Store.IndexInput.ReadBytes ( byte[]  b,
int  offset,
int  len,
bool  useBuffer 
)
virtual

Reads a specified number of bytes into an array at the specified offset with control over whether the read should be buffered (callers who have their own buffer should pass in "false" for useBuffer). Currently only BufferedIndexInput respects this parameter.

Parameters
bthe array to read bytes into
offsetthe offset in the array to start storing bytes
lenthe number of bytes to read
useBufferset to false if the caller will handle buffering.
See Also
IndexOutput.WriteBytes(byte[],int)

Reimplemented in Lucene.Net.Store.BufferedIndexInput.

Definition at line 66 of file IndexInput.cs.

virtual void Lucene.Net.Store.IndexInput.ReadChars ( char[]  buffer,
int  start,
int  length 
)
virtual

Reads Lucene's old "modified UTF-8" encoded characters into an array.

Parameters
bufferthe array to read characters into
startthe offset in the array to start storing characters
lengththe number of characters to read
See Also
IndexOutput.WriteChars(String,int,int)

<deprecated> – please use readString or readBytes instead, and construct the string from those utf8 bytes </deprecated>

Definition at line 169 of file IndexInput.cs.

virtual int Lucene.Net.Store.IndexInput.ReadInt ( )
virtual

Reads four bytes and returns an int.

See Also
IndexOutput.WriteInt(int)

Definition at line 75 of file IndexInput.cs.

virtual long Lucene.Net.Store.IndexInput.ReadLong ( )
virtual

Reads eight bytes and returns a long.

See Also
IndexOutput.WriteLong(long)

Definition at line 101 of file IndexInput.cs.

virtual System.String Lucene.Net.Store.IndexInput.ReadString ( )
virtual

Reads a string.

See Also
IndexOutput.WriteString(String)

Definition at line 135 of file IndexInput.cs.

virtual System.Collections.Generic.IDictionary<string,string> Lucene.Net.Store.IndexInput.ReadStringStringMap ( )
virtual

Definition at line 274 of file IndexInput.cs.

virtual int Lucene.Net.Store.IndexInput.ReadVInt ( )
virtual

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

See Also
IndexOutput.WriteVInt(int)

Definition at line 86 of file IndexInput.cs.

virtual long Lucene.Net.Store.IndexInput.ReadVLong ( )
virtual

Reads a long stored in variable-length format. Reads between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported.

Definition at line 110 of file IndexInput.cs.

abstract void Lucene.Net.Store.IndexInput.Seek ( long  pos)
pure virtual

Sets current position in this file, where the next read will occur.

See Also
FilePointer

Implemented in Lucene.Net.Store.BufferedIndexInput, Lucene.Net.Store.RAMInputStream, and Lucene.Net.Store.ChecksumIndexInput.

virtual void Lucene.Net.Store.IndexInput.SetModifiedUTF8StringsMode ( )
virtual

Call this if readString should read characters stored in the old modified UTF8 format (length in java chars and java's modified UTF8 encoding). This is used for indices written pre-2.4 See LUCENE-510 for details.

Definition at line 127 of file IndexInput.cs.

virtual void Lucene.Net.Store.IndexInput.SkipChars ( int  length)
virtual

Expert

Similar to ReadChars(char[], int, int) but does not do any conversion operations on the bytes it is reading in. It still has to invoke ReadByte() just as ReadChars(char[], int, int) does, but it does not need a buffer to store anything and it does not have to do any of the bitwise operations, since we don't actually care what is in the byte except to determine how many more bytes to read

Parameters
lengthThe number of chars to read

<deprecated> this method operates on old "modified utf8" encoded strings </deprecated>

Definition at line 199 of file IndexInput.cs.

Property Documentation

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

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

See Also
Seek(long)

Definition at line 240 of file IndexInput.cs.


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