C# Class Lucene.Net.Store.BufferedIndexInput

Base implementation class for buffered IndexInput.
Inheritance: IndexInput
显示文件 Open project: paulirwin/lucene.net Class Usage Examples

Protected Properties

Property Type Description
Buffer byte[]

Public Methods

Method Description
BufferSize ( IOContext context ) : int

Returns default buffer sizes for the given IOContext

BufferedIndexInput ( string resourceDesc ) : System
BufferedIndexInput ( string resourceDesc, IOContext context ) : System
BufferedIndexInput ( string resourceDesc, int bufferSize ) : System

Inits BufferedIndexInput with a specific bufferSize

Clone ( ) : object
ReadByte ( ) : byte
ReadBytes ( byte b, int offset, int len ) : void
ReadBytes ( byte b, int offset, int len, bool useBuffer ) : void
ReadInt ( ) : int
ReadLong ( ) : long
ReadShort ( ) : short
ReadVInt ( ) : int
ReadVLong ( ) : long
Seek ( long pos ) : void

Protected Methods

Method Description
FlushBuffer ( Lucene.Net.Store.IndexOutput @out, long numBytes ) : int

Flushes the in-memory buffer to the given output, copying at most numBytes.

NOTE: this method does not refill the buffer, however it does advance the buffer position.

NewBuffer ( byte newBuffer ) : void
ReadInternal ( byte b, int offset, int length ) : void

Expert: implements buffer refill. Reads bytes from the current position in the input.

SeekInternal ( long pos ) : void

Expert: implements seek. Sets current position in this file, where the next #readInternal(byte[],int,int) will occur.

Private Methods

Method Description
CheckBufferSize ( int bufferSize ) : void
Refill ( ) : void

Method Details

BufferSize() public static method

Returns default buffer sizes for the given IOContext
public static BufferSize ( IOContext context ) : int
context IOContext
return int

BufferedIndexInput() public method

public BufferedIndexInput ( string resourceDesc ) : System
resourceDesc string
return System

BufferedIndexInput() public method

public BufferedIndexInput ( string resourceDesc, IOContext context ) : System
resourceDesc string
context IOContext
return System

BufferedIndexInput() public method

Inits BufferedIndexInput with a specific bufferSize
public BufferedIndexInput ( string resourceDesc, int bufferSize ) : System
resourceDesc string
bufferSize int
return System

Clone() public method

public Clone ( ) : object
return object

FlushBuffer() protected method

Flushes the in-memory buffer to the given output, copying at most numBytes.

NOTE: this method does not refill the buffer, however it does advance the buffer position.

protected FlushBuffer ( Lucene.Net.Store.IndexOutput @out, long numBytes ) : int
@out Lucene.Net.Store.IndexOutput
numBytes long
return int

NewBuffer() protected method

protected NewBuffer ( byte newBuffer ) : void
newBuffer byte
return void

ReadByte() public final method

public final ReadByte ( ) : byte
return byte

ReadBytes() public final method

public final ReadBytes ( byte b, int offset, int len ) : void
b byte
offset int
len int
return void

ReadBytes() public final method

public final ReadBytes ( byte b, int offset, int len, bool useBuffer ) : void
b byte
offset int
len int
useBuffer bool
return void

ReadInt() public final method

public final ReadInt ( ) : int
return int

ReadInternal() protected abstract method

Expert: implements buffer refill. Reads bytes from the current position in the input.
protected abstract ReadInternal ( byte b, int offset, int length ) : void
b byte the array to read bytes into
offset int the offset in the array to start storing bytes
length int the number of bytes to read
return void

ReadLong() public final method

public final ReadLong ( ) : long
return long

ReadShort() public final method

public final ReadShort ( ) : short
return short

ReadVInt() public final method

public final ReadVInt ( ) : int
return int

ReadVLong() public final method

public final ReadVLong ( ) : long
return long

Seek() public final method

public final Seek ( long pos ) : void
pos long
return void

SeekInternal() protected abstract method

Expert: implements seek. Sets current position in this file, where the next #readInternal(byte[],int,int) will occur.
protected abstract SeekInternal ( long pos ) : void
pos long
return void

Property Details

Buffer protected_oe property

protected byte[] Buffer
return byte[]