Fork me on GitHub
  • API

    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.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    PagedBytes
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Util
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class PagedBytes

    Constructors

    PagedBytes(int)

    1<<blockBits must be bigger than biggest single BytesRef slice that will be pulled.

    Declaration
    public PagedBytes(int blockBits)
    Parameters
    Type Name Description
    int blockBits

    Methods

    Copy(IndexInput, long)

    Read this many bytes from in.

    Declaration
    public void Copy(IndexInput @in, long byteCount)
    Parameters
    Type Name Description
    IndexInput in
    long byteCount

    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

    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
    long

    Freeze(bool)

    Commits final byte[], trimming it if necessary and if trim=true.

    Declaration
    public PagedBytes.Reader Freeze(bool trim)
    Parameters
    Type Name Description
    bool trim
    Returns
    Type Description
    PagedBytes.Reader

    GetDataInput()

    Returns a DataInput to read values from this PagedBytes instance.

    Declaration
    public PagedBytes.PagedBytesDataInput GetDataInput()
    Returns
    Type Description
    PagedBytes.PagedBytesDataInput

    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

    GetPointer()

    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.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public long GetPointer()
    Returns
    Type Description
    long

    RamBytesUsed()

    Return approx RAM usage in bytes.

    Declaration
    public long RamBytesUsed()
    Returns
    Type Description
    long
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.