• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/db-4.7.25.NC/docs/java/com/sleepycat/bind/tuple/
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>
7TupleOutput (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.bind.tuple.TupleOutput 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="TupleOutput (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/TupleOutput.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/TupleMarshalledBinding.html" title="class in com.sleepycat.bind.tuple"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleTupleBinding.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/TupleOutput.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="TupleOutput.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;<A HREF="#fields_inherited_from_class_com.sleepycat.util.FastOutputStream">FIELD</A>&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 TupleOutput</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="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html" title="class or interface in java.io">java.io.OutputStream</A>
94      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/sleepycat/util/FastOutputStream.html" title="class in com.sleepycat.util">com.sleepycat.util.FastOutputStream</A>
95          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.bind.tuple.TupleOutput</B>
96</PRE>
97<DL>
98<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Closeable.html" title="class or interface in java.io">Closeable</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Flushable.html" title="class or interface in java.io">Flushable</A></DD>
99</DL>
100<HR>
101<DL>
102<DT><PRE>public class <B>TupleOutput</B><DT>extends <A HREF="../../../../com/sleepycat/util/FastOutputStream.html" title="class in com.sleepycat.util">FastOutputStream</A></DL>
103</PRE>
104
105<P>
106An <code>OutputStream</code> with <code>DataOutput</code>-like methods for
107 writing tuple fields.  It is used by <code>TupleBinding</code>.
108
109 <p>This class has many methods that have the same signatures as methods in
110 the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataOutput.html" title="class or interface in java.io"><CODE>DataOutput</CODE></A> interface.  The reason this class does not
111 implement <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/DataOutput.html" title="class or interface in java.io"><CODE>DataOutput</CODE></A> is because it would break the interface
112 contract for those methods because of data format differences.</p>
113
114 <p>Signed numbers are stored in the buffer in MSB (most significant byte
115 first) order with their sign bit (high-order bit) inverted to cause negative
116 numbers to be sorted first when comparing values as unsigned byte arrays,
117 as done in a database.  Unsigned numbers, including characters, are stored
118 in MSB order with no change to their sign bit.  BigInteger values are stored
119 with a preceding length having the same sign as the value.</p>
120
121 <p>Strings and character arrays are stored either as a fixed length array of
122 unicode characters, where the length must be known by the application, or as
123 a null-terminated UTF byte array.</p>
124 <ul>
125 <li>Null strings are UTF encoded as { 0xFF }, which is not allowed in a
126 standard UTF encoding.  This allows null strings, as distinct from empty or
127 zero length strings, to be represented in a tuple.  Using the default
128 comparator, null strings will be ordered last.</li>
129 <li>Zero (0x0000) character values are UTF encoded as non-zero values, and
130 therefore embedded zeros in the string are supported.  The sequence { 0xC0,
131 0x80 } is used to encode a zero character.  This UTF encoding is the same
132 one used by native Java UTF libraries.  However, this encoding of zero does
133 impact the lexicographical ordering, and zeros will not be sorted first (the
134 natural order) or last.  For all character values other than zero, the
135 default UTF byte ordering is the same as the Unicode lexicographical
136 character ordering.</li>
137 </ul>
138
139 <p>Floats and doubles are stored using two different representations: sorted
140 representation and integer-bit (IEEE 754) representation.  If you use
141 negative floating point numbers in a key, you should use sorted
142 representation; alternatively you may use integer-bit representation but you
143 will need to implement and configure a custom comparator to get correct
144 numeric ordering for negative numbers.</p>
145
146 <p>To use sorted representation use this set of methods:</p>
147 <ul>
148 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedFloat(float)"><CODE>writeSortedFloat(float)</CODE></A></li>
149 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readSortedFloat()"><CODE>TupleInput.readSortedFloat()</CODE></A></li>
150 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedDouble(double)"><CODE>writeSortedDouble(double)</CODE></A></li>
151 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readSortedDouble()"><CODE>TupleInput.readSortedDouble()</CODE></A></li>
152 </ul>
153
154 <p>To use integer-bit representation use this set of methods:</p>
155 <ul>
156 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeFloat(float)"><CODE>writeFloat(float)</CODE></A></li>
157 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readFloat()"><CODE>TupleInput.readFloat()</CODE></A></li>
158 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeDouble(double)"><CODE>writeDouble(double)</CODE></A></li>
159 <li><A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readDouble()"><CODE>TupleInput.readDouble()</CODE></A></li>
160 </ul>
161<P>
162
163<P>
164<HR>
165
166<P>
167<!-- =========== FIELD SUMMARY =========== -->
168
169<A NAME="field_summary"><!-- --></A>
170<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
171<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
172<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
173<B>Field Summary</B></FONT></TH>
174</TR>
175</TABLE>
176&nbsp;<A NAME="fields_inherited_from_class_com.sleepycat.util.FastOutputStream"><!-- --></A>
177<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
178<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
179<TH ALIGN="left"><B>Fields inherited from class com.sleepycat.util.<A HREF="../../../../com/sleepycat/util/FastOutputStream.html" title="class in com.sleepycat.util">FastOutputStream</A></B></TH>
180</TR>
181<TR BGCOLOR="white" CLASS="TableRowColor">
182<TD><CODE><A HREF="../../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_BUMP_SIZE">DEFAULT_BUMP_SIZE</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#DEFAULT_INIT_SIZE">DEFAULT_INIT_SIZE</A></CODE></TD>
183</TR>
184</TABLE>
185&nbsp;
186<!-- ======== CONSTRUCTOR SUMMARY ======== -->
187
188<A NAME="constructor_summary"><!-- --></A>
189<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
190<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
191<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
192<B>Constructor Summary</B></FONT></TH>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#TupleOutput()">TupleOutput</A></B>()</CODE>
196
197<BR>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a tuple output object for writing a byte array of tuple data.</TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#TupleOutput(byte[])">TupleOutput</A></B>(byte[]&nbsp;buffer)</CODE>
202
203<BR>
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a tuple output object for writing a byte array of tuple data,
205 using a given buffer.</TD>
206</TR>
207</TABLE>
208&nbsp;
209<!-- ========== METHOD SUMMARY =========== -->
210
211<A NAME="method_summary"><!-- --></A>
212<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
213<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
214<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
215<B>Method Summary</B></FONT></TH>
216</TR>
217<TR BGCOLOR="white" CLASS="TableRowColor">
218<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219<CODE>static&nbsp;int</CODE></FONT></TD>
220<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#getBigIntegerByteLength(java.math.BigInteger)">getBigIntegerByteLength</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html" title="class or interface in java.math">BigInteger</A>&nbsp;val)</CODE>
221
222<BR>
223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the byte length of a given <code>BigInteger</code> value.</TD>
224</TR>
225<TR BGCOLOR="white" CLASS="TableRowColor">
226<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
228<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeBigInteger(java.math.BigInteger)">writeBigInteger</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html" title="class or interface in java.math">BigInteger</A>&nbsp;val)</CODE>
229
230<BR>
231&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a <code>BigInteger</code>.</TD>
232</TR>
233<TR BGCOLOR="white" CLASS="TableRowColor">
234<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
236<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeBoolean(boolean)">writeBoolean</A></B>(boolean&nbsp;val)</CODE>
237
238<BR>
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a boolean (one byte) unsigned value to the buffer, writing one
240 if the value is true and zero if it is false.</TD>
241</TR>
242<TR BGCOLOR="white" CLASS="TableRowColor">
243<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
245<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeByte(int)">writeByte</A></B>(int&nbsp;val)</CODE>
246
247<BR>
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed byte (one byte) value to the buffer.</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeBytes(char[])">writeBytes</A></B>(char[]&nbsp;chars)</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified bytes to the buffer, converting each character to
257 an unsigned byte value.</TD>
258</TR>
259<TR BGCOLOR="white" CLASS="TableRowColor">
260<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
261<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
262<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeBytes(java.lang.String)">writeBytes</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</CODE>
263
264<BR>
265&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified bytes to the buffer, converting each character to
266 an unsigned byte value.</TD>
267</TR>
268<TR BGCOLOR="white" CLASS="TableRowColor">
269<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
270<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
271<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeChar(int)">writeChar</A></B>(int&nbsp;val)</CODE>
272
273<BR>
274&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a char (two byte) unsigned value to the buffer.</TD>
275</TR>
276<TR BGCOLOR="white" CLASS="TableRowColor">
277<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
278<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
279<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeChars(char[])">writeChars</A></B>(char[]&nbsp;chars)</CODE>
280
281<BR>
282&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified characters to the buffer, converting each character
283 to a two byte unsigned value.</TD>
284</TR>
285<TR BGCOLOR="white" CLASS="TableRowColor">
286<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
287<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
288<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeChars(java.lang.String)">writeChars</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</CODE>
289
290<BR>
291&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified characters to the buffer, converting each character
292 to a two byte unsigned value.</TD>
293</TR>
294<TR BGCOLOR="white" CLASS="TableRowColor">
295<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
296<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
297<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeDouble(double)">writeDouble</A></B>(double&nbsp;val)</CODE>
298
299<BR>
300&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed double (eight byte) value to the buffer.</TD>
301</TR>
302<TR BGCOLOR="white" CLASS="TableRowColor">
303<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
304<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
305<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeFloat(float)">writeFloat</A></B>(float&nbsp;val)</CODE>
306
307<BR>
308&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed float (four byte) value to the buffer.</TD>
309</TR>
310<TR BGCOLOR="white" CLASS="TableRowColor">
311<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
312<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
313<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeInt(int)">writeInt</A></B>(int&nbsp;val)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed int (four byte) value to the buffer.</TD>
317</TR>
318<TR BGCOLOR="white" CLASS="TableRowColor">
319<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
320<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
321<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeLong(long)">writeLong</A></B>(long&nbsp;val)</CODE>
322
323<BR>
324&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed long (eight byte) value to the buffer.</TD>
325</TR>
326<TR BGCOLOR="white" CLASS="TableRowColor">
327<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
328<CODE>&nbsp;void</CODE></FONT></TD>
329<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writePackedInt(int)">writePackedInt</A></B>(int&nbsp;val)</CODE>
330
331<BR>
332&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed integer.</TD>
333</TR>
334<TR BGCOLOR="white" CLASS="TableRowColor">
335<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
336<CODE>&nbsp;void</CODE></FONT></TD>
337<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writePackedLong(long)">writePackedLong</A></B>(long&nbsp;val)</CODE>
338
339<BR>
340&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed long integer.</TD>
341</TR>
342<TR BGCOLOR="white" CLASS="TableRowColor">
343<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
344<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
345<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeShort(int)">writeShort</A></B>(int&nbsp;val)</CODE>
346
347<BR>
348&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an signed short (two byte) value to the buffer.</TD>
349</TR>
350<TR BGCOLOR="white" CLASS="TableRowColor">
351<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
352<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
353<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedDouble(double)">writeSortedDouble</A></B>(double&nbsp;val)</CODE>
354
355<BR>
356&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a signed double (eight byte) value to the buffer, with support
357 for correct default sorting of all values.</TD>
358</TR>
359<TR BGCOLOR="white" CLASS="TableRowColor">
360<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
361<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
362<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedFloat(float)">writeSortedFloat</A></B>(float&nbsp;val)</CODE>
363
364<BR>
365&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a signed float (four byte) value to the buffer, with support for
366 correct default sorting of all values.</TD>
367</TR>
368<TR BGCOLOR="white" CLASS="TableRowColor">
369<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
370<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
371<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeString(char[])">writeString</A></B>(char[]&nbsp;chars)</CODE>
372
373<BR>
374&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified characters to the buffer, converting each character
375 to UTF format.</TD>
376</TR>
377<TR BGCOLOR="white" CLASS="TableRowColor">
378<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
379<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
380<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeString(java.lang.String)">writeString</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</CODE>
381
382<BR>
383&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the specified characters to the buffer, converting each character
384 to UTF format, and adding a null terminator byte.</TD>
385</TR>
386<TR BGCOLOR="white" CLASS="TableRowColor">
387<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
388<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
389<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeUnsignedByte(int)">writeUnsignedByte</A></B>(int&nbsp;val)</CODE>
390
391<BR>
392&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an unsigned byte (one byte) value to the buffer.</TD>
393</TR>
394<TR BGCOLOR="white" CLASS="TableRowColor">
395<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
396<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
397<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeUnsignedInt(long)">writeUnsignedInt</A></B>(long&nbsp;val)</CODE>
398
399<BR>
400&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an unsigned int (four byte) value to the buffer.</TD>
401</TR>
402<TR BGCOLOR="white" CLASS="TableRowColor">
403<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
404<CODE>&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A></CODE></FONT></TD>
405<TD><CODE><B><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeUnsignedShort(int)">writeUnsignedShort</A></B>(int&nbsp;val)</CODE>
406
407<BR>
408&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an unsigned short (two byte) value to the buffer.</TD>
409</TR>
410</TABLE>
411&nbsp;<A NAME="methods_inherited_from_class_com.sleepycat.util.FastOutputStream"><!-- --></A>
412<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
413<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
414<TH ALIGN="left"><B>Methods inherited from class com.sleepycat.util.<A HREF="../../../../com/sleepycat/util/FastOutputStream.html" title="class in com.sleepycat.util">FastOutputStream</A></B></TH>
415</TR>
416<TR BGCOLOR="white" CLASS="TableRowColor">
417<TD><CODE><A HREF="../../../../com/sleepycat/util/FastOutputStream.html#addSize(int)">addSize</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#getBufferBytes()">getBufferBytes</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#getBufferLength()">getBufferLength</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#getBufferOffset()">getBufferOffset</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#makeSpace(int)">makeSpace</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#reset()">reset</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#size()">size</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#toByteArray()">toByteArray</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#toString()">toString</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#toString(java.lang.String)">toString</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#write(byte[])">write</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#write(byte[], int, int)">write</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#write(int)">write</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[])">writeFast</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#writeFast(byte[], int, int)">writeFast</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#writeFast(int)">writeFast</A>, <A HREF="../../../../com/sleepycat/util/FastOutputStream.html#writeTo(java.io.OutputStream)">writeTo</A></CODE></TD>
418</TR>
419</TABLE>
420&nbsp;<A NAME="methods_inherited_from_class_java.io.OutputStream"><!-- --></A>
421<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
422<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
423<TH ALIGN="left"><B>Methods inherited from class java.io.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html" title="class or interface in java.io">OutputStream</A></B></TH>
424</TR>
425<TR BGCOLOR="white" CLASS="TableRowColor">
426<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html#close()" title="class or interface in java.io">close</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/OutputStream.html#flush()" title="class or interface in java.io">flush</A></CODE></TD>
427</TR>
428</TABLE>
429&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
430<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
431<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
432<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>
433</TR>
434<TR BGCOLOR="white" CLASS="TableRowColor">
435<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#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>
436</TR>
437</TABLE>
438&nbsp;
439<P>
440
441<!-- ========= CONSTRUCTOR DETAIL ======== -->
442
443<A NAME="constructor_detail"><!-- --></A>
444<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
445<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
446<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
447<B>Constructor Detail</B></FONT></TH>
448</TR>
449</TABLE>
450
451<A NAME="TupleOutput()"><!-- --></A><H3>
452TupleOutput</H3>
453<PRE>
454public <B>TupleOutput</B>()</PRE>
455<DL>
456<DD>Creates a tuple output object for writing a byte array of tuple data.
457<P>
458</DL>
459<HR>
460
461<A NAME="TupleOutput(byte[])"><!-- --></A><H3>
462TupleOutput</H3>
463<PRE>
464public <B>TupleOutput</B>(byte[]&nbsp;buffer)</PRE>
465<DL>
466<DD>Creates a tuple output object for writing a byte array of tuple data,
467 using a given buffer.  A new buffer will be allocated only if the number
468 of bytes needed is greater than the length of this buffer.  A reference
469 to the byte array will be kept by this object and therefore the byte
470 array should not be modified while this object is in use.
471<P>
472<DL>
473<DT><B>Parameters:</B><DD><CODE>buffer</CODE> - is the byte array to use as the buffer.</DL>
474</DL>
475
476<!-- ============ METHOD DETAIL ========== -->
477
478<A NAME="method_detail"><!-- --></A>
479<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
480<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
481<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
482<B>Method Detail</B></FONT></TH>
483</TR>
484</TABLE>
485
486<A NAME="writeBytes(java.lang.String)"><!-- --></A><H3>
487writeBytes</H3>
488<PRE>
489public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeBytes</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</PRE>
490<DL>
491<DD>Writes the specified bytes to the buffer, converting each character to
492 an unsigned byte value.
493 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readBytes(int)"><CODE>TupleInput.readBytes(int)</CODE></A>.
494 Only characters with values below 0x100 may be written using this
495 method, since the high-order 8 bits of all characters are discarded.
496<P>
497<DD><DL>
498<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the string containing the values to be written.
499<DT><B>Returns:</B><DD>this tuple output object.
500<DT><B>Throws:</B>
501<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the val parameter is null.</DL>
502</DD>
503</DL>
504<HR>
505
506<A NAME="writeChars(java.lang.String)"><!-- --></A><H3>
507writeChars</H3>
508<PRE>
509public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeChars</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</PRE>
510<DL>
511<DD>Writes the specified characters to the buffer, converting each character
512 to a two byte unsigned value.
513 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readChars(int)"><CODE>TupleInput.readChars(int)</CODE></A>.
514<P>
515<DD><DL>
516<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the string containing the characters to be written.
517<DT><B>Returns:</B><DD>this tuple output object.
518<DT><B>Throws:</B>
519<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the val parameter is null.</DL>
520</DD>
521</DL>
522<HR>
523
524<A NAME="writeString(java.lang.String)"><!-- --></A><H3>
525writeString</H3>
526<PRE>
527public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeString</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;val)</PRE>
528<DL>
529<DD>Writes the specified characters to the buffer, converting each character
530 to UTF format, and adding a null terminator byte.
531 Note that zero (0x0000) character values are encoded as non-zero values
532 and a null String parameter is encoded as 0xFF.
533 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readString()"><CODE>TupleInput.readString()</CODE></A>.
534<P>
535<DD><DL>
536<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the string containing the characters to be written.
537<DT><B>Returns:</B><DD>this tuple output object.</DL>
538</DD>
539</DL>
540<HR>
541
542<A NAME="writeChar(int)"><!-- --></A><H3>
543writeChar</H3>
544<PRE>
545public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeChar</B>(int&nbsp;val)</PRE>
546<DL>
547<DD>Writes a char (two byte) unsigned value to the buffer.
548 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readChar()"><CODE>TupleInput.readChar()</CODE></A>.
549<P>
550<DD><DL>
551<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
552<DT><B>Returns:</B><DD>this tuple output object.</DL>
553</DD>
554</DL>
555<HR>
556
557<A NAME="writeBoolean(boolean)"><!-- --></A><H3>
558writeBoolean</H3>
559<PRE>
560public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeBoolean</B>(boolean&nbsp;val)</PRE>
561<DL>
562<DD>Writes a boolean (one byte) unsigned value to the buffer, writing one
563 if the value is true and zero if it is false.
564 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readBoolean()"><CODE>TupleInput.readBoolean()</CODE></A>.
565<P>
566<DD><DL>
567<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
568<DT><B>Returns:</B><DD>this tuple output object.</DL>
569</DD>
570</DL>
571<HR>
572
573<A NAME="writeByte(int)"><!-- --></A><H3>
574writeByte</H3>
575<PRE>
576public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeByte</B>(int&nbsp;val)</PRE>
577<DL>
578<DD>Writes an signed byte (one byte) value to the buffer.
579 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readByte()"><CODE>TupleInput.readByte()</CODE></A>.
580<P>
581<DD><DL>
582<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
583<DT><B>Returns:</B><DD>this tuple output object.</DL>
584</DD>
585</DL>
586<HR>
587
588<A NAME="writeShort(int)"><!-- --></A><H3>
589writeShort</H3>
590<PRE>
591public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeShort</B>(int&nbsp;val)</PRE>
592<DL>
593<DD>Writes an signed short (two byte) value to the buffer.
594 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readShort()"><CODE>TupleInput.readShort()</CODE></A>.
595<P>
596<DD><DL>
597<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
598<DT><B>Returns:</B><DD>this tuple output object.</DL>
599</DD>
600</DL>
601<HR>
602
603<A NAME="writeInt(int)"><!-- --></A><H3>
604writeInt</H3>
605<PRE>
606public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeInt</B>(int&nbsp;val)</PRE>
607<DL>
608<DD>Writes an signed int (four byte) value to the buffer.
609 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readInt()"><CODE>TupleInput.readInt()</CODE></A>.
610<P>
611<DD><DL>
612<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
613<DT><B>Returns:</B><DD>this tuple output object.</DL>
614</DD>
615</DL>
616<HR>
617
618<A NAME="writeLong(long)"><!-- --></A><H3>
619writeLong</H3>
620<PRE>
621public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeLong</B>(long&nbsp;val)</PRE>
622<DL>
623<DD>Writes an signed long (eight byte) value to the buffer.
624 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readLong()"><CODE>TupleInput.readLong()</CODE></A>.
625<P>
626<DD><DL>
627<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
628<DT><B>Returns:</B><DD>this tuple output object.</DL>
629</DD>
630</DL>
631<HR>
632
633<A NAME="writeFloat(float)"><!-- --></A><H3>
634writeFloat</H3>
635<PRE>
636public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeFloat</B>(float&nbsp;val)</PRE>
637<DL>
638<DD>Writes an signed float (four byte) value to the buffer.
639 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readFloat()"><CODE>TupleInput.readFloat()</CODE></A>.
640 <code>Float.floatToIntBits</code> is used to convert the signed float
641 value.
642
643 <p><em>Note:</em> This method produces byte array values that by default
644 (without a custom comparator) do <em>not</em> sort correctly for
645 negative values.  Only non-negative values are sorted correctly by
646 default.  To sort all values correctly by default, use <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedFloat(float)"><CODE>writeSortedFloat(float)</CODE></A>.</p>
647<P>
648<DD><DL>
649<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
650<DT><B>Returns:</B><DD>this tuple output object.</DL>
651</DD>
652</DL>
653<HR>
654
655<A NAME="writeDouble(double)"><!-- --></A><H3>
656writeDouble</H3>
657<PRE>
658public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeDouble</B>(double&nbsp;val)</PRE>
659<DL>
660<DD>Writes an signed double (eight byte) value to the buffer.
661 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readDouble()"><CODE>TupleInput.readDouble()</CODE></A>.
662 <code>Double.doubleToLongBits</code> is used to convert the signed
663 double value.
664
665 <p><em>Note:</em> This method produces byte array values that by default
666 (without a custom comparator) do <em>not</em> sort correctly for
667 negative values.  Only non-negative values are sorted correctly by
668 default.  To sort all values correctly by default, use <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeSortedDouble(double)"><CODE>writeSortedDouble(double)</CODE></A>.</p>
669<P>
670<DD><DL>
671<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
672<DT><B>Returns:</B><DD>this tuple output object.</DL>
673</DD>
674</DL>
675<HR>
676
677<A NAME="writeSortedFloat(float)"><!-- --></A><H3>
678writeSortedFloat</H3>
679<PRE>
680public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeSortedFloat</B>(float&nbsp;val)</PRE>
681<DL>
682<DD>Writes a signed float (four byte) value to the buffer, with support for
683 correct default sorting of all values.
684 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readSortedFloat()"><CODE>TupleInput.readSortedFloat()</CODE></A>.
685
686 <p><code>Float.floatToIntBits</code> and the following bit manipulations
687 are used to convert the signed float value to a representation that is
688 sorted correctly by default.</p>
689 <pre>
690  int intVal = Float.floatToIntBits(val);
691  intVal ^= (intVal &lt; 0) ? 0xffffffff : 0x80000000;
692 </pre>
693<P>
694<DD><DL>
695<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
696<DT><B>Returns:</B><DD>this tuple output object.</DL>
697</DD>
698</DL>
699<HR>
700
701<A NAME="writeSortedDouble(double)"><!-- --></A><H3>
702writeSortedDouble</H3>
703<PRE>
704public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeSortedDouble</B>(double&nbsp;val)</PRE>
705<DL>
706<DD>Writes a signed double (eight byte) value to the buffer, with support
707 for correct default sorting of all values.
708 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readSortedDouble()"><CODE>TupleInput.readSortedDouble()</CODE></A>.
709
710 <p><code>Float.doubleToLongBits</code> and the following bit
711 manipulations are used to convert the signed double value to a
712 representation that is sorted correctly by default.</p>
713 <pre>
714  long longVal = Double.doubleToLongBits(val);
715  longVal ^= (longVal &lt; 0) ? 0xffffffffffffffffL : 0x8000000000000000L;
716 </pre>
717<P>
718<DD><DL>
719<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
720<DT><B>Returns:</B><DD>this tuple output object.</DL>
721</DD>
722</DL>
723<HR>
724
725<A NAME="writeBytes(char[])"><!-- --></A><H3>
726writeBytes</H3>
727<PRE>
728public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeBytes</B>(char[]&nbsp;chars)</PRE>
729<DL>
730<DD>Writes the specified bytes to the buffer, converting each character to
731 an unsigned byte value.
732 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readBytes(int)"><CODE>TupleInput.readBytes(int)</CODE></A>.
733 Only characters with values below 0x100 may be written using this
734 method, since the high-order 8 bits of all characters are discarded.
735<P>
736<DD><DL>
737<DT><B>Parameters:</B><DD><CODE>chars</CODE> - is the array of values to be written.
738<DT><B>Returns:</B><DD>this tuple output object.
739<DT><B>Throws:</B>
740<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the chars parameter is null.</DL>
741</DD>
742</DL>
743<HR>
744
745<A NAME="writeChars(char[])"><!-- --></A><H3>
746writeChars</H3>
747<PRE>
748public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeChars</B>(char[]&nbsp;chars)</PRE>
749<DL>
750<DD>Writes the specified characters to the buffer, converting each character
751 to a two byte unsigned value.
752 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readChars(int)"><CODE>TupleInput.readChars(int)</CODE></A>.
753<P>
754<DD><DL>
755<DT><B>Parameters:</B><DD><CODE>chars</CODE> - is the array of characters to be written.
756<DT><B>Returns:</B><DD>this tuple output object.
757<DT><B>Throws:</B>
758<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the chars parameter is null.</DL>
759</DD>
760</DL>
761<HR>
762
763<A NAME="writeString(char[])"><!-- --></A><H3>
764writeString</H3>
765<PRE>
766public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeString</B>(char[]&nbsp;chars)</PRE>
767<DL>
768<DD>Writes the specified characters to the buffer, converting each character
769 to UTF format.
770 Note that zero (0x0000) character values are encoded as non-zero values.
771 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readString(int)"><CODE>TupleInput.readString(int)</CODE></A>
772 or <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readString(char[])"><CODE>TupleInput.readString(char[])</CODE></A>.
773<P>
774<DD><DL>
775<DT><B>Parameters:</B><DD><CODE>chars</CODE> - is the array of characters to be written.
776<DT><B>Returns:</B><DD>this tuple output object.
777<DT><B>Throws:</B>
778<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the chars parameter is null.</DL>
779</DD>
780</DL>
781<HR>
782
783<A NAME="writeUnsignedByte(int)"><!-- --></A><H3>
784writeUnsignedByte</H3>
785<PRE>
786public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeUnsignedByte</B>(int&nbsp;val)</PRE>
787<DL>
788<DD>Writes an unsigned byte (one byte) value to the buffer.
789 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readUnsignedByte()"><CODE>TupleInput.readUnsignedByte()</CODE></A>.
790<P>
791<DD><DL>
792<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
793<DT><B>Returns:</B><DD>this tuple output object.</DL>
794</DD>
795</DL>
796<HR>
797
798<A NAME="writeUnsignedShort(int)"><!-- --></A><H3>
799writeUnsignedShort</H3>
800<PRE>
801public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeUnsignedShort</B>(int&nbsp;val)</PRE>
802<DL>
803<DD>Writes an unsigned short (two byte) value to the buffer.
804 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readUnsignedShort()"><CODE>TupleInput.readUnsignedShort()</CODE></A>.
805<P>
806<DD><DL>
807<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
808<DT><B>Returns:</B><DD>this tuple output object.</DL>
809</DD>
810</DL>
811<HR>
812
813<A NAME="writeUnsignedInt(long)"><!-- --></A><H3>
814writeUnsignedInt</H3>
815<PRE>
816public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeUnsignedInt</B>(long&nbsp;val)</PRE>
817<DL>
818<DD>Writes an unsigned int (four byte) value to the buffer.
819 Writes values that can be read using <A HREF="../../../../com/sleepycat/bind/tuple/TupleInput.html#readUnsignedInt()"><CODE>TupleInput.readUnsignedInt()</CODE></A>.
820<P>
821<DD><DL>
822<DT><B>Parameters:</B><DD><CODE>val</CODE> - is the value to write to the buffer.
823<DT><B>Returns:</B><DD>this tuple output object.</DL>
824</DD>
825</DL>
826<HR>
827
828<A NAME="writePackedInt(int)"><!-- --></A><H3>
829writePackedInt</H3>
830<PRE>
831public final void <B>writePackedInt</B>(int&nbsp;val)</PRE>
832<DL>
833<DD>Writes a packed integer.  Note that packed integers are not appropriate
834 for sorted values (keys) unless a custom comparator is used.
835<P>
836<DD><DL>
837<DT><B>See Also:</B><DD><A HREF="../../../../com/sleepycat/util/PackedInteger.html" title="class in com.sleepycat.util"><CODE>PackedInteger</CODE></A></DL>
838</DD>
839</DL>
840<HR>
841
842<A NAME="writePackedLong(long)"><!-- --></A><H3>
843writePackedLong</H3>
844<PRE>
845public final void <B>writePackedLong</B>(long&nbsp;val)</PRE>
846<DL>
847<DD>Writes a packed long integer.  Note that packed integers are not
848 appropriate for sorted values (keys) unless a custom comparator is used.
849<P>
850<DD><DL>
851<DT><B>See Also:</B><DD><A HREF="../../../../com/sleepycat/util/PackedInteger.html" title="class in com.sleepycat.util"><CODE>PackedInteger</CODE></A></DL>
852</DD>
853</DL>
854<HR>
855
856<A NAME="writeBigInteger(java.math.BigInteger)"><!-- --></A><H3>
857writeBigInteger</H3>
858<PRE>
859public final <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html" title="class in com.sleepycat.bind.tuple">TupleOutput</A> <B>writeBigInteger</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html" title="class or interface in java.math">BigInteger</A>&nbsp;val)</PRE>
860<DL>
861<DD>Writes a <code>BigInteger</code>.  Supported <code>BigInteger</code> values are
862 limited to those with a byte array (<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html#toByteArray()" title="class or interface in java.math"><CODE>BigInteger.toByteArray()</CODE></A>)
863 representation with a size of 0x7fff bytes or less.  The maximum <code>BigInteger</code> value is (2<sup>0x3fff7</sup> - 1) and the minimum value is
864 (-2<sup>0x3fff7</sup>).
865
866 <p>The byte format for a <code>BigInteger</code> value is:</p>
867 <ul>
868 <li>Byte 0 and 1: The length of the following bytes, negated if the
869 <code>BigInteger</code> value is negative, and written as a sorted value as
870 if <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeShort(int)"><CODE>writeShort(int)</CODE></A> were called.</li>
871 <li>Byte 2: The first byte of the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html#toByteArray()" title="class or interface in java.math"><CODE>BigInteger.toByteArray()</CODE></A> array,
872 written as a sorted value as if <A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeByte(int)"><CODE>writeByte(int)</CODE></A> were called.</li>
873 <li>Byte 3 to N: The second and remaining bytes, if any, of the <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html#toByteArray()" title="class or interface in java.math"><CODE>BigInteger.toByteArray()</CODE></A> array, written without modification.</li>
874 </ul>
875 <p>This format provides correct default sorting when the default
876 byte-by-byte comparison is used.</p>
877<P>
878<DD><DL>
879
880<DT><B>Throws:</B>
881<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if val is null.
882<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the byte array representation of val
883 is larger than 0x7fff bytes.</DL>
884</DD>
885</DL>
886<HR>
887
888<A NAME="getBigIntegerByteLength(java.math.BigInteger)"><!-- --></A><H3>
889getBigIntegerByteLength</H3>
890<PRE>
891public static int <B>getBigIntegerByteLength</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigInteger.html" title="class or interface in java.math">BigInteger</A>&nbsp;val)</PRE>
892<DL>
893<DD>Returns the byte length of a given <code>BigInteger</code> value.
894<P>
895<DD><DL>
896<DT><B>See Also:</B><DD><A HREF="../../../../com/sleepycat/bind/tuple/TupleOutput.html#writeBigInteger(java.math.BigInteger)"><CODE>writeBigInteger(java.math.BigInteger)</CODE></A></DL>
897</DD>
898</DL>
899<!-- ========= END OF CLASS DATA ========= -->
900<HR>
901
902
903<!-- ======= START OF BOTTOM NAVBAR ====== -->
904<A NAME="navbar_bottom"><!-- --></A>
905<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
906<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
907<TR>
908<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
909<A NAME="navbar_bottom_firstrow"><!-- --></A>
910<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
911  <TR ALIGN="center" VALIGN="top">
912  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
913  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
914  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
915  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TupleOutput.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
916  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
917  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
918  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
919  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
920  </TR>
921</TABLE>
922</TD>
923<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
924<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
925</TD>
926</TR>
927
928<TR>
929<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
930&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleMarshalledBinding.html" title="class in com.sleepycat.bind.tuple"><B>PREV CLASS</B></A>&nbsp;
931&nbsp;<A HREF="../../../../com/sleepycat/bind/tuple/TupleTupleBinding.html" title="class in com.sleepycat.bind.tuple"><B>NEXT CLASS</B></A></FONT></TD>
932<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
933  <A HREF="../../../../index.html?com/sleepycat/bind/tuple/TupleOutput.html" target="_top"><B>FRAMES</B></A>  &nbsp;
934&nbsp;<A HREF="TupleOutput.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
935&nbsp;<SCRIPT type="text/javascript">
936  <!--
937  if(window==top) {
938    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
939  }
940  //-->
941</SCRIPT>
942<NOSCRIPT>
943  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
944</NOSCRIPT>
945
946
947</FONT></TD>
948</TR>
949<TR>
950<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
951  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_com.sleepycat.util.FastOutputStream">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
952<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
953DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
954</TR>
955</TABLE>
956<A NAME="skip-navbar_bottom"></A>
957<!-- ======== END OF BOTTOM NAVBAR ======= -->
958
959<HR>
960<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
961</BODY>
962</HTML>
963