Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.analysis.payloads
Class PayloadHelper

    java.lang.Object
      org.apache.lucene.analysis.payloads.PayloadHelper

    public class PayloadHelper

extends Object

Constructor Summary
`PayloadHelper()`

Method Summary
`static float` | `decodeFloat(byte[] bytes)`
`static float` | `decodeFloat(byte[] bytes, int offset)` Decode the payload that was encoded using `encodeFloat(float)`.
`static int` | `decodeInt(byte[] bytes, int offset)`
`static byte[]` | `encodeFloat(float payload)`
`static byte[]` | `encodeFloat(float payload, byte[] data, int offset)`
`static byte[]` | `encodeInt(int payload, byte[] data, int offset)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PayloadHelper

    public PayloadHelper()

Method Detail

### encodeFloat

    public static byte[] encodeFloat(float payload)

### encodeFloat

    public static byte[] encodeFloat(float payload,
                                     byte[] data,
                                     int offset)

### encodeInt

    public static byte[] encodeInt(int payload,
                                   byte[] data,
                                   int offset)

### decodeFloat

    public static float decodeFloat(byte[] bytes)

  Parameters:
    `bytes` -
  Returns:
    the decoded float
  See Also:
    `decodeFloat(byte[], int)`, `encodeFloat(float)`

### decodeFloat

    public static final float decodeFloat(byte[] bytes,
                                          int offset)

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

  Parameters:
    `bytes` - The bytes to decode
    `offset` - The offset into the array.
  Returns:
    The float that was encoded
  See Also:
    `encodeFloat (float)`

### decodeInt

    public static final int decodeInt(byte[] bytes,
                                      int offset)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.