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 SourceDecodeInt32(Byte[], Int32)
NOTE: This was decodeInt() in Lucene
Declaration
public static int DecodeInt32(byte[] bytes, int offset)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes | |
System. |
offset |
Returns
Type | Description |
---|---|
System. |
DecodeSingle(Byte[])
NOTE: This was decodeFloat() in Lucene
Declaration
public static float DecodeSingle(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes |
Returns
Type | Description |
---|---|
System. |
the decoded float |
See Also
| Improve this Doc View SourceDecodeSingle(Byte[], Int32)
Decode the payload that was encoded using Encode
NOTE: This was decodeFloat() in Lucene
Declaration
public static float DecodeSingle(byte[] bytes, int offset)
Parameters
Type | Name | Description |
---|---|---|
System. |
bytes | The bytes to decode |
System. |
offset | The offset into the array. |
Returns
Type | Description |
---|---|
System. |
The float that was encoded |
See Also
| Improve this Doc View SourceEncodeInt32(Int32)
NOTE: This was encodeInt() in Lucene
Declaration
public static byte[] EncodeInt32(int payload)
Parameters
Type | Name | Description |
---|---|---|
System. |
payload |
Returns
Type | Description |
---|---|
System. |
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. |
payload | |
System. |
data | |
System. |
offset |
Returns
Type | Description |
---|---|
System. |
EncodeSingle(Single)
NOTE: This was encodeFloat() in Lucene
Declaration
public static byte[] EncodeSingle(float payload)
Parameters
Type | Name | Description |
---|---|---|
System. |
payload |
Returns
Type | Description |
---|---|
System. |
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. |
payload | |
System. |
data | |
System. |
offset |
Returns
Type | Description |
---|---|
System. |