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