Class PagedBytes
Represents a logical byte[] as a series of pages. You
can write-once into the logical byte[] (append only),
using copy, and then retrieve slices (BytesRef) into it
using fill.
This is a Lucene.NET INTERNAL API, use at your own risk
Inheritance
System.Object
PagedBytes
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)
System.Object.ToString()
Assembly: Lucene.Net.dll
Syntax
public sealed class PagedBytes
Constructors
|
Improve this Doc
View Source
PagedBytes(Int32)
1<<blockBits must be bigger than biggest single
BytesRef slice that will be pulled.
Declaration
public PagedBytes(int blockBits)
Parameters
Type |
Name |
Description |
System.Int32 |
blockBits |
|
Methods
|
Improve this Doc
View Source
Copy(IndexInput, Int64)
Read this many bytes from in
.
Declaration
public void Copy(IndexInput in, long byteCount)
Parameters
Type |
Name |
Description |
IndexInput |
in |
|
System.Int64 |
byteCount |
|
|
Improve this Doc
View Source
Copy(BytesRef, BytesRef)
Copy BytesRef in, setting BytesRef out to the result.
Do not use this if you will use Freeze(true)
.
This only supports bytes.Length <= blockSize
/
Declaration
public void Copy(BytesRef bytes, BytesRef out)
Parameters
|
Improve this Doc
View Source
CopyUsingLengthPrefix(BytesRef)
Copy bytes in, writing the length as a 1 or 2 byte
vInt prefix.
Declaration
public long CopyUsingLengthPrefix(BytesRef bytes)
Parameters
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
Freeze(Boolean)
Commits final byte[], trimming it if necessary and if trim
=true.
Declaration
public PagedBytes.Reader Freeze(bool trim)
Parameters
Type |
Name |
Description |
System.Boolean |
trim |
|
Returns
|
Improve this Doc
View Source
GetDataInput()
Declaration
public PagedBytes.PagedBytesDataInput GetDataInput()
Returns
|
Improve this Doc
View Source
GetDataOutput()
Returns a DataOutput that you may use to write into
this PagedBytes instance. If you do this, you should
not call the other writing methods (eg, copy);
results are undefined.
Declaration
public PagedBytes.PagedBytesDataOutput GetDataOutput()
Returns
|
Improve this Doc
View Source
GetPointer()
Declaration
Returns
Type |
Description |
System.Int64 |
|
|
Improve this Doc
View Source
RamBytesUsed()
Return approx RAM usage in bytes.
Declaration
public long RamBytesUsed()
Returns
Type |
Description |
System.Int64 |
|
Extension Methods