com.sleepycat.bind.tuple

Class StringBinding

public class StringBinding extends TupleBinding

A concrete TupleBinding for a simple String value.

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 StringentryToString(DatabaseEntry entry)
Converts an entry buffer into a simple String value.
protected TupleOutputgetTupleOutput(Object object)
voidobjectToEntry(Object object, TupleOutput output)
static voidstringToEntry(String val, DatabaseEntry entry)
Converts a simple String value into an entry buffer.

Method Detail

entryToObject

public Object entryToObject(TupleInput input)

entryToString

public static String entryToString(DatabaseEntry entry)
Converts an entry buffer into a simple String 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)

stringToEntry

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

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