Show / Hide Table of Contents

    Class PayloadHelper

    Utility methods for encoding payloads.

    Inheritance
    System.Object
    PayloadHelper
    Namespace: Lucene.Net.Analysis.Payloads
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public class PayloadHelper : object

    Methods

    | Improve this Doc View Source

    DecodeInt32(Byte[], Int32)

    NOTE: This was decodeInt() in Lucene

    Declaration
    public static int DecodeInt32(byte[] bytes, int offset)
    Parameters
    Type Name Description
    System.Byte[] bytes
    System.Int32 offset
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    DecodeSingle(Byte[])

    NOTE: This was decodeFloat() in Lucene

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

    the decoded float

    See Also
    DecodeSingle(Byte[], Int32)
    EncodeSingle(Single)
    | Improve this Doc View Source

    DecodeSingle(Byte[], Int32)

    Decode the payload that was encoded using EncodeSingle(Single). 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
    System.Byte[] bytes

    The bytes to decode

    System.Int32 offset

    The offset into the array.

    Returns
    Type Description
    System.Single

    The float that was encoded

    See Also
    EncodeSingle(Single)
    | Improve this Doc View Source

    EncodeInt32(Int32)

    NOTE: This was encodeInt() in Lucene

    Declaration
    public static byte[] EncodeInt32(int payload)
    Parameters
    Type Name Description
    System.Int32 payload
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    EncodeInt32(Int32, Byte[], Int32)

    NOTE: This was encodeInt() in Lucene

    Declaration
    public static byte[] EncodeInt32(int payload, byte[] data, int offset)
    Parameters
    Type Name Description
    System.Int32 payload
    System.Byte[] data
    System.Int32 offset
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    EncodeSingle(Single)

    NOTE: This was encodeFloat() in Lucene

    Declaration
    public static byte[] EncodeSingle(float payload)
    Parameters
    Type Name Description
    System.Single payload
    Returns
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    EncodeSingle(Single, Byte[], Int32)

    NOTE: This was encodeFloat() in Lucene

    Declaration
    public static byte[] EncodeSingle(float payload, byte[] data, int offset)
    Parameters
    Type Name Description
    System.Single payload
    System.Byte[] data
    System.Int32 offset
    Returns
    Type Description
    System.Byte[]
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)