Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PayloadHelper

    Utility methods for encoding payloads.

    Inheritance
    object
    PayloadHelper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Analysis.Payloads
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public static class PayloadHelper

    Methods

    DecodeInt32(byte[], int)

    NOTE: This was decodeInt() in Lucene

    Declaration
    public static int DecodeInt32(byte[] bytes, int offset)
    Parameters
    Type Name Description
    byte[] bytes
    int offset
    Returns
    Type Description
    int

    DecodeSingle(byte[])

    NOTE: This was decodeFloat() in Lucene

    Declaration
    public static float DecodeSingle(byte[] bytes)
    Parameters
    Type Name Description
    byte[] bytes
    Returns
    Type Description
    float

    the decoded float

    See Also
    DecodeSingle(byte[], int)
    EncodeSingle(float)

    DecodeSingle(byte[], int)

    Decode the payload that was encoded using EncodeSingle(float). NOTE: the length of the array must be at least offset + 4 long.

    NOTE: This was decodeFloat() in Lucene
    Declaration
    public static float DecodeSingle(byte[] bytes, int offset)
    Parameters
    Type Name Description
    byte[] bytes

    The bytes to decode

    int offset

    The offset into the array.

    Returns
    Type Description
    float

    The float that was encoded

    See Also
    EncodeSingle(float)

    EncodeInt32(int)

    NOTE: This was encodeInt() in Lucene

    Declaration
    public static byte[] EncodeInt32(int payload)
    Parameters
    Type Name Description
    int payload
    Returns
    Type Description
    byte[]

    EncodeInt32(int, byte[], int)

    NOTE: This was encodeInt() in Lucene

    Declaration
    public static byte[] EncodeInt32(int payload, byte[] data, int offset)
    Parameters
    Type Name Description
    int payload
    byte[] data
    int offset
    Returns
    Type Description
    byte[]

    EncodeSingle(float)

    NOTE: This was encodeFloat() in Lucene

    Declaration
    public static byte[] EncodeSingle(float payload)
    Parameters
    Type Name Description
    float payload
    Returns
    Type Description
    byte[]

    EncodeSingle(float, byte[], int)

    NOTE: This was encodeFloat() in Lucene

    Declaration
    public static byte[] EncodeSingle(float payload, byte[] data, int offset)
    Parameters
    Type Name Description
    float payload
    byte[] data
    int offset
    Returns
    Type Description
    byte[]
    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.