1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:32 EDT 2008 -->
6<TITLE>
7TupleBinding (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.bind.tuple.TupleBinding class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="TupleBinding (Oracle - Berkeley DB Java API)";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TupleBinding.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
45  </TR>
46</TABLE>
47</TD>
48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
50</TD>
51</TR>
52
53<TR>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55&nbsp;<A HREF="/com/sleepycat/bind/tuple/TupleBase.html" title="class in com.sleepycat.bind.tuple"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple"><B>NEXT CLASS</B></A></FONT></TD>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58  <A HREF="/index.html?com/sleepycat/bind/tuple/TupleBinding.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="TupleBinding.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
60&nbsp;<SCRIPT type="text/javascript">
61  <!--
62  if(window==top) {
63    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
64  }
65  //-->
66</SCRIPT>
67<NOSCRIPT>
68  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
69</NOSCRIPT>
70
71
72</FONT></TD>
73</TR>
74<TR>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
79</TR>
80</TABLE>
81<A NAME="skip-navbar_top"></A>
82<!-- ========= END OF TOP NAVBAR ========= -->
83
84<HR>
85<!-- ======== START OF CLASS DATA ======== -->
86<H2>
87<FONT SIZE="-1">
88com.sleepycat.bind.tuple</FONT>
89<BR>
90Class TupleBinding</H2>
91<PRE>
92<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
93  <IMG SRC="/resources/inherit.gif" ALT="extended by "><A HREF="/com/sleepycat/bind/tuple/TupleBase.html" title="class in com.sleepycat.bind.tuple">com.sleepycat.bind.tuple.TupleBase</A>
94      <IMG SRC="/resources/inherit.gif" ALT="extended by "><B>com.sleepycat.bind.tuple.TupleBinding</B>
95</PRE>
96<DL>
97<DT><B>All Implemented Interfaces:</B> <DD><A HREF="/com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</A></DD>
98</DL>
99<DL>
100<DT><B>Direct Known Subclasses:</B> <DD><A HREF="/com/sleepycat/bind/tuple/BigIntegerBinding.html" title="class in com.sleepycat.bind.tuple">BigIntegerBinding</A>, <A HREF="/com/sleepycat/bind/tuple/BooleanBinding.html" title="class in com.sleepycat.bind.tuple">BooleanBinding</A>, <A HREF="/com/sleepycat/bind/tuple/ByteBinding.html" title="class in com.sleepycat.bind.tuple">ByteBinding</A>, <A HREF="/com/sleepycat/bind/tuple/CharacterBinding.html" title="class in com.sleepycat.bind.tuple">CharacterBinding</A>, <A HREF="/com/sleepycat/bind/tuple/DoubleBinding.html" title="class in com.sleepycat.bind.tuple">DoubleBinding</A>, <A HREF="/com/sleepycat/bind/tuple/FloatBinding.html" title="class in com.sleepycat.bind.tuple">FloatBinding</A>, <A HREF="/com/sleepycat/bind/tuple/IntegerBinding.html" title="class in com.sleepycat.bind.tuple">IntegerBinding</A>, <A HREF="/com/sleepycat/bind/tuple/LongBinding.html" title="class in com.sleepycat.bind.tuple">LongBinding</A>, <A HREF="/com/sleepycat/bind/tuple/ShortBinding.html" title="class in com.sleepycat.bind.tuple">ShortBinding</A>, <A HREF="/com/sleepycat/bind/tuple/SortedDoubleBinding.html" title="class in com.sleepycat.bind.tuple">SortedDoubleBinding</A>, <A HREF="/com/sleepycat/bind/tuple/SortedFloatBinding.html" title="class in com.sleepycat.bind.tuple">SortedFloatBinding</A>, <A HREF="/com/sleepycat/bind/tuple/StringBinding.html" title="class in com.sleepycat.bind.tuple">StringBinding</A>, <A HREF="/com/sleepycat/bind/tuple/TupleMarshalledBinding.html" title="class in com.sleepycat.bind.tuple">TupleMarshalledBinding</A></DD>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public abstract class <B>TupleBinding</B><DT>extends <A HREF="/com/sleepycat/bind/tuple/TupleBase.html" title="class in com.sleepycat.bind.tuple">TupleBase</A><DT>implements <A HREF="/com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</A></DL>
105</PRE>
106
107<P>
108An abstract <code>EntryBinding</code> that treats a key or data entry as a
109 tuple; it includes predefined bindings for Java primitive types.
110
111 <p>This class takes care of converting the entries to/from <A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple"><CODE>TupleInput</CODE></A> and <A HREF="/com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple"><CODE>TupleOutput</CODE></A> objects.  Its two abstract methods must
112 be implemented by a concrete subclass to convert between tuples and key or
113 data objects.</p>
114 <ul>
115 <li> <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#entryToObject(com.sleepycat.bind.tuple.TupleInput)"><CODE>entryToObject(TupleInput)</CODE></A> </li>
116 <li> <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#objectToEntry(java.lang.Object, com.sleepycat.bind.tuple.TupleOutput)"><CODE>objectToEntry(Object,TupleOutput)</CODE></A> </li>
117 </ul>
118
119 <p>For key or data entries which are Java primitive classes (String,
120 Integer, etc) <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#getPrimitiveBinding(java.lang.Class)"><CODE>getPrimitiveBinding(java.lang.Class)</CODE></A> may be used to return a built in
121 tuple binding.  A custom tuple binding for these types is not needed.
122 <em>Note:</em> <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#getPrimitiveBinding(java.lang.Class)"><CODE>getPrimitiveBinding(java.lang.Class)</CODE></A> returns bindings that do not
123 sort negative floating point numbers correctly by default.  See <A HREF="/com/sleepycat/bind/tuple/SortedFloatBinding.html" title="class in com.sleepycat.bind.tuple"><CODE>SortedFloatBinding</CODE></A> and <A HREF="/com/sleepycat/bind/tuple/SortedDoubleBinding.html" title="class in com.sleepycat.bind.tuple"><CODE>SortedDoubleBinding</CODE></A> for details.</p>
124
125 <p>When a tuple binding is used as a key binding, it produces key values
126 with a reasonable default sort order.  For more information on the default
127 sort order, see <A HREF="/com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple"><CODE>TupleOutput</CODE></A>.</p>
128<P>
129
130<P>
131<HR>
132
133<P>
134
135<!-- ======== CONSTRUCTOR SUMMARY ======== -->
136
137<A NAME="constructor_summary"><!-- --></A>
138<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
139<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
140<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
141<B>Constructor Summary</B></FONT></TH>
142</TR>
143<TR BGCOLOR="white" CLASS="TableRowColor">
144<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#TupleBinding()">TupleBinding</A></B>()</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a tuple binding.</TD>
148</TR>
149</TABLE>
150&nbsp;
151<!-- ========== METHOD SUMMARY =========== -->
152
153<A NAME="method_summary"><!-- --></A>
154<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
155<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
156<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
157<B>Method Summary</B></FONT></TH>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
162<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#entryToObject(com.sleepycat.db.DatabaseEntry)">entryToObject</A></B>(<A HREF="/com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;entry)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a entry buffer into an Object.</TD>
166</TR>
167<TR BGCOLOR="white" CLASS="TableRowColor">
168<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169<CODE>abstract &nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
170<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#entryToObject(com.sleepycat.bind.tuple.TupleInput)">entryToObject</A></B>(<A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple">TupleInput</A>&nbsp;input)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a key or data object from a <A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple"><CODE>TupleInput</CODE></A> entry.</TD>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177<CODE>static&nbsp;<A HREF="/com/sleepycat/bind/tuple/TupleBinding.html" title="class in com.sleepycat.bind.tuple">TupleBinding</A></CODE></FONT></TD>
178<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#getPrimitiveBinding(java.lang.Class)">getPrimitiveBinding</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&nbsp;cls)</CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a tuple binding for a primitive Java class.</TD>
182</TR>
183<TR BGCOLOR="white" CLASS="TableRowColor">
184<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185<CODE>&nbsp;void</CODE></FONT></TD>
186<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#objectToEntry(java.lang.Object, com.sleepycat.db.DatabaseEntry)">objectToEntry</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;object,
187              <A HREF="/com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;entry)</CODE>
188
189<BR>
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts an Object into a entry buffer.</TD>
191</TR>
192<TR BGCOLOR="white" CLASS="TableRowColor">
193<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194<CODE>abstract &nbsp;void</CODE></FONT></TD>
195<TD><CODE><B><A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#objectToEntry(java.lang.Object, com.sleepycat.bind.tuple.TupleOutput)">objectToEntry</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;object,
196              <A HREF="/com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A>&nbsp;output)</CODE>
197
198<BR>
199&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts a key or data object to a tuple entry.</TD>
200</TR>
201</TABLE>
202&nbsp;<A NAME="methods_inherited_from_class_com.sleepycat.bind.tuple.TupleBase"><!-- --></A>
203<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
205<TH ALIGN="left"><B>Methods inherited from class com.sleepycat.bind.tuple.<A HREF="/com/sleepycat/bind/tuple/TupleBase.html" title="class in com.sleepycat.bind.tuple">TupleBase</A></B></TH>
206</TR>
207<TR BGCOLOR="white" CLASS="TableRowColor">
208<TD><CODE><A HREF="/com/sleepycat/bind/tuple/TupleBase.html#entryToInput(com.sleepycat.db.DatabaseEntry)">entryToInput</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#getTupleBufferSize()">getTupleBufferSize</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#getTupleOutput(java.lang.Object)">getTupleOutput</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#inputToEntry(com.sleepycat.bind.tuple.TupleInput, com.sleepycat.db.DatabaseEntry)">inputToEntry</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#newOutput()">newOutput</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#newOutput(byte[])">newOutput</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#outputToEntry(com.sleepycat.bind.tuple.TupleOutput, com.sleepycat.db.DatabaseEntry)">outputToEntry</A>, <A HREF="/com/sleepycat/bind/tuple/TupleBase.html#setTupleBufferSize(int)">setTupleBufferSize</A></CODE></TD>
209</TR>
210</TABLE>
211&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
212<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
213<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
214<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
215</TR>
216<TR BGCOLOR="white" CLASS="TableRowColor">
217<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
218</TR>
219</TABLE>
220&nbsp;
221<P>
222
223<!-- ========= CONSTRUCTOR DETAIL ======== -->
224
225<A NAME="constructor_detail"><!-- --></A>
226<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
227<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
228<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
229<B>Constructor Detail</B></FONT></TH>
230</TR>
231</TABLE>
232
233<A NAME="TupleBinding()"><!-- --></A><H3>
234TupleBinding</H3>
235<PRE>
236public <B>TupleBinding</B>()</PRE>
237<DL>
238<DD>Creates a tuple binding.
239<P>
240</DL>
241
242<!-- ============ METHOD DETAIL ========== -->
243
244<A NAME="method_detail"><!-- --></A>
245<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
246<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
247<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
248<B>Method Detail</B></FONT></TH>
249</TR>
250</TABLE>
251
252<A NAME="entryToObject(com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
253entryToObject</H3>
254<PRE>
255public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>entryToObject</B>(<A HREF="/com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;entry)</PRE>
256<DL>
257<DD><B>Description copied from interface: <CODE><A HREF="/com/sleepycat/bind/EntryBinding.html#entryToObject(com.sleepycat.db.DatabaseEntry)">EntryBinding</A></CODE></B></DD>
258<DD>Converts a entry buffer into an Object.
259<P>
260<DD><DL>
261<DT><B>Specified by:</B><DD><CODE><A HREF="/com/sleepycat/bind/EntryBinding.html#entryToObject(com.sleepycat.db.DatabaseEntry)">entryToObject</A></CODE> in interface <CODE><A HREF="/com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</A></CODE></DL>
262</DD>
263<DD><DL>
264<DT><B>Parameters:</B><DD><CODE>entry</CODE> - is the source entry buffer.
265<DT><B>Returns:</B><DD>the resulting Object.</DL>
266</DD>
267</DL>
268<HR>
269
270<A NAME="objectToEntry(java.lang.Object, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
271objectToEntry</H3>
272<PRE>
273public void <B>objectToEntry</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;object,
274                          <A HREF="/com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;entry)</PRE>
275<DL>
276<DD><B>Description copied from interface: <CODE><A HREF="/com/sleepycat/bind/EntryBinding.html#objectToEntry(java.lang.Object, com.sleepycat.db.DatabaseEntry)">EntryBinding</A></CODE></B></DD>
277<DD>Converts an Object into a entry buffer.
278<P>
279<DD><DL>
280<DT><B>Specified by:</B><DD><CODE><A HREF="/com/sleepycat/bind/EntryBinding.html#objectToEntry(java.lang.Object, com.sleepycat.db.DatabaseEntry)">objectToEntry</A></CODE> in interface <CODE><A HREF="/com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</A></CODE></DL>
281</DD>
282<DD><DL>
283<DT><B>Parameters:</B><DD><CODE>object</CODE> - is the source Object.<DD><CODE>entry</CODE> - is the destination entry buffer.</DL>
284</DD>
285</DL>
286<HR>
287
288<A NAME="entryToObject(com.sleepycat.bind.tuple.TupleInput)"><!-- --></A><H3>
289entryToObject</H3>
290<PRE>
291public abstract <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>entryToObject</B>(<A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple">TupleInput</A>&nbsp;input)</PRE>
292<DL>
293<DD>Constructs a key or data object from a <A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple"><CODE>TupleInput</CODE></A> entry.
294<P>
295<DD><DL>
296</DL>
297</DD>
298<DD><DL>
299<DT><B>Parameters:</B><DD><CODE>input</CODE> - is the tuple key or data entry.
300<DT><B>Returns:</B><DD>the key or data object constructed from the entry.</DL>
301</DD>
302</DL>
303<HR>
304
305<A NAME="objectToEntry(java.lang.Object, com.sleepycat.bind.tuple.TupleOutput)"><!-- --></A><H3>
306objectToEntry</H3>
307<PRE>
308public abstract void <B>objectToEntry</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;object,
309                                   <A HREF="/com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A>&nbsp;output)</PRE>
310<DL>
311<DD>Converts a key or data object to a tuple entry.
312<P>
313<DD><DL>
314</DL>
315</DD>
316<DD><DL>
317<DT><B>Parameters:</B><DD><CODE>object</CODE> - is the key or data object.<DD><CODE>output</CODE> - is the tuple entry to which the key or data should be
318 written.</DL>
319</DD>
320</DL>
321<HR>
322
323<A NAME="getPrimitiveBinding(java.lang.Class)"><!-- --></A><H3>
324getPrimitiveBinding</H3>
325<PRE>
326public static <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html" title="class in com.sleepycat.bind.tuple">TupleBinding</A> <B>getPrimitiveBinding</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&nbsp;cls)</PRE>
327<DL>
328<DD>Creates a tuple binding for a primitive Java class.  The following
329 Java classes are supported.
330 <ul>
331 <li><code>String</code></li>
332 <li><code>Character</code></li>
333 <li><code>Boolean</code></li>
334 <li><code>Byte</code></li>
335 <li><code>Short</code></li>
336 <li><code>Integer</code></li>
337 <li><code>Long</code></li>
338 <li><code>Float</code></li>
339 <li><code>Double</code></li>
340 </ul>
341
342 <p><em>Note:</em> <A HREF="/com/sleepycat/bind/tuple/TupleBinding.html#getPrimitiveBinding(java.lang.Class)"><CODE>getPrimitiveBinding(java.lang.Class)</CODE></A> returns bindings that do
343 not sort negative floating point numbers correctly by default.  See
344 <A HREF="/com/sleepycat/bind/tuple/SortedFloatBinding.html" title="class in com.sleepycat.bind.tuple"><CODE>SortedFloatBinding</CODE></A> and <A HREF="/com/sleepycat/bind/tuple/SortedDoubleBinding.html" title="class in com.sleepycat.bind.tuple"><CODE>SortedDoubleBinding</CODE></A> for
345 details.</p>
346<P>
347<DD><DL>
348</DL>
349</DD>
350<DD><DL>
351<DT><B>Parameters:</B><DD><CODE>cls</CODE> - is the primitive Java class.
352<DT><B>Returns:</B><DD>a new binding for the primitive class or null if the cls
353 parameter is not one of the supported classes.</DL>
354</DD>
355</DL>
356<!-- ========= END OF CLASS DATA ========= -->
357<HR>
358
359
360<!-- ======= START OF BOTTOM NAVBAR ====== -->
361<A NAME="navbar_bottom"><!-- --></A>
362<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
363<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
364<TR>
365<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
366<A NAME="navbar_bottom_firstrow"><!-- --></A>
367<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
368  <TR ALIGN="center" VALIGN="top">
369  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
370  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
371  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
372  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TupleBinding.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
373  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
374  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
375  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
376  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
377  </TR>
378</TABLE>
379</TD>
380<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
381<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
382</TD>
383</TR>
384
385<TR>
386<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
387&nbsp;<A HREF="/com/sleepycat/bind/tuple/TupleBase.html" title="class in com.sleepycat.bind.tuple"><B>PREV CLASS</B></A>&nbsp;
388&nbsp;<A HREF="/com/sleepycat/bind/tuple/TupleInput.html" title="class in com.sleepycat.bind.tuple"><B>NEXT CLASS</B></A></FONT></TD>
389<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
390  <A HREF="/index.html?com/sleepycat/bind/tuple/TupleBinding.html" target="_top"><B>FRAMES</B></A>  &nbsp;
391&nbsp;<A HREF="TupleBinding.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
392&nbsp;<SCRIPT type="text/javascript">
393  <!--
394  if(window==top) {
395    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
396  }
397  //-->
398</SCRIPT>
399<NOSCRIPT>
400  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
401</NOSCRIPT>
402
403
404</FONT></TD>
405</TR>
406<TR>
407<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
408  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
409<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
410DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
411</TR>
412</TABLE>
413<A NAME="skip-navbar_bottom"></A>
414<!-- ======== END OF BOTTOM NAVBAR ======= -->
415
416<HR>
417<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
418</BODY>
419</HTML>
420