com.sleepycat.bind.tuple

Class ShortBinding

public class ShortBinding extends TupleBinding

A concrete TupleBinding for a Short primitive wrapper or a short primitive.

There are two ways to use this class:

  1. When using the com.sleepycat.db package directly, the static methods in this class can be used to convert between primitive values and DatabaseEntry objects.
  2. When using the com.sleepycat.collections package, an instance of this class can be used with any stored collection. The easiest way to obtain a binding instance is with the TupleBinding method.
Method Summary
ObjectentryToObject(TupleInput input)
static shortentryToShort(DatabaseEntry entry)
Converts an entry buffer into a simple short value.
protected TupleOutputgetTupleOutput(Object object)
voidobjectToEntry(Object object, TupleOutput output)
static voidshortToEntry(short val, DatabaseEntry entry)
Converts a simple short value into an entry buffer.

Method Detail

entryToObject

public Object entryToObject(TupleInput input)

entryToShort

public static short entryToShort(DatabaseEntry entry)
Converts an entry buffer into a simple short value.

Parameters: entry is the source entry buffer.

Returns: the resulting value.

getTupleOutput

protected TupleOutput getTupleOutput(Object object)

objectToEntry

public void objectToEntry(Object object, TupleOutput output)

shortToEntry

public static void shortToEntry(short val, DatabaseEntry entry)
Converts a simple short value into an entry buffer.

Parameters: val is the source value. entry is the destination entry buffer.