Class ByteBufferIndexInput
Base IndexInput implementation that uses an array of J2N.IO.ByteBuffers to represent a file.
Because Java's J2N.IO.ByteBuffer uses an System.Int32 to address the values, it's necessary to access a file greater System.Int32.MaxValue in size using multiple byte buffers.
For efficiency, this class requires that the buffers
are a power-of-two (chunkSizePower
).
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Lucene.Net.Store
Assembly: Lucene.Net.dll
Syntax
public abstract class ByteBufferIndexInput : IndexInput, IDisposable
Properties
| Improve this Doc View SourceLength
Declaration
public override sealed long Length { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Overrides
Methods
| Improve this Doc View SourceClone()
Declaration
public override sealed object Clone()
Returns
Type | Description |
---|---|
System.Object |
Overrides
| Improve this Doc View SourceDispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
| Improve this Doc View SourceFreeBuffer(ByteBuffer)
Called when the contents of a buffer will be no longer needed.
Declaration
protected abstract void FreeBuffer(ByteBuffer b)
Parameters
Type | Name | Description |
---|---|---|
J2N.IO.ByteBuffer | b |
GetFilePointer()
Declaration
public override sealed long GetFilePointer()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
| Improve this Doc View SourceReadByte()
Declaration
public override sealed byte ReadByte()
Returns
Type | Description |
---|---|
System.Byte |
Overrides
| Improve this Doc View SourceReadBytes(Byte[], Int32, Int32)
Declaration
public override sealed void ReadBytes(byte[] b, int offset, int len)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | b | |
System.Int32 | offset | |
System.Int32 | len |
Overrides
| Improve this Doc View SourceReadInt16()
NOTE: this was readShort() in Lucene
Declaration
public override sealed short ReadInt16()
Returns
Type | Description |
---|---|
System.Int16 |
Overrides
| Improve this Doc View SourceReadInt32()
NOTE: this was readInt() in Lucene
Declaration
public override sealed int ReadInt32()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
| Improve this Doc View SourceReadInt64()
NOTE: this was readLong() in Lucene
Declaration
public override sealed long ReadInt64()
Returns
Type | Description |
---|---|
System.Int64 |
Overrides
| Improve this Doc View SourceSeek(Int64)
Declaration
public override sealed void Seek(long pos)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | pos |
Overrides
| Improve this Doc View SourceSlice(String, Int64, Int64)
Creates a slice of this index input, with the given description, offset, and length. The slice is seeked to the beginning.
Declaration
public ByteBufferIndexInput Slice(string sliceDescription, long offset, long length)
Parameters
Type | Name | Description |
---|---|---|
System.String | sliceDescription | |
System.Int64 | offset | |
System.Int64 | length |
Returns
Type | Description |
---|---|
ByteBufferIndexInput |
ToString()
Declaration
public override sealed string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Implements
System.IDisposable