Show / Hide Table of Contents

    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
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class PagedBytes : object

    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
    Type Name Description
    BytesRef bytes
    BytesRef out
    | 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
    Type Name Description
    BytesRef bytes
    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
    Type Description
    PagedBytes.Reader
    | Improve this Doc View Source

    GetDataInput()

    Returns a DataInput to read values from this PagedBytes instance.

    Declaration
    public PagedBytes.PagedBytesDataInput GetDataInput()
    Returns
    Type Description
    PagedBytes.PagedBytesDataInput
    | 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
    Type Description
    PagedBytes.PagedBytesDataOutput
    | Improve this Doc View Source

    GetPointer()

    Declaration
    public long GetPointer()
    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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)