Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class PayloadHelper

    Utility methods for encoding payloads.

    Inheritance
    System.Object
    PayloadHelper
    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()
    Namespace: Lucene.Net.Analysis.Payloads
    Assembly: Lucene.Net.Analysis.Common.dll
    Syntax
    public static class PayloadHelper

    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 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.