Debian Codegraph @

docs/java/com/sleepycat/util/PackedInteger.html

raw symbols SCIP
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_51) on Mon Sep 09 11:47:06 EDT 2013 -->
6 <TITLE>
7 PackedInteger (Oracle - Berkeley DB Java API)
8 </TITLE>
9
10 <META NAME="date" CONTENT="2013-09-09">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="PackedInteger (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/PackedInteger.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 5.3.28</font></EM>
53 </TD>
54 </TR>
55
56 <TR>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 &nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
59 &nbsp;<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../index.html?com/sleepycat/util/PackedInteger.html" target="_top"><B>FRAMES</B></A> &nbsp;
62 &nbsp;<A HREF="PackedInteger.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="#field_summary">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">
81 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&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">
91 com.sleepycat.util</FONT>
92 <BR>
93 Class PackedInteger</H2>
94 <PRE>
95 <A HREF="http://download.oracle.com/javase/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 "><B>com.sleepycat.util.PackedInteger</B>
97 </PRE>
98 <HR>
99 <DL>
100 <DT><PRE>public class <B>PackedInteger</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101 </PRE>
102
103 <P>
104 Static methods for reading and writing packed integers.
105
106 <p>Most applications should use the classes in the <A HREF="../../../com/sleepycat/bind/tuple/package-summary.html"><CODE>com.sleepycat.bind.tuple</CODE></A> package rather than using this class directly.</p>
107 <P>
108
109 <P>
110 <DL>
111 <DT><B>See Also:</B><DD><a href="../bind/tuple/package-summary.html#integerFormats">Integer Formats</a></DL>
112 <HR>
113
114 <P>
115 <!-- =========== FIELD SUMMARY =========== -->
116
117 <A NAME="field_summary"><!-- --></A>
118 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
119 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
120 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
121 <B>Field Summary</B></FONT></TH>
122 </TR>
123 <TR BGCOLOR="white" CLASS="TableRowColor">
124 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
125 <CODE>static&nbsp;int</CODE></FONT></TD>
126 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#MAX_LENGTH">MAX_LENGTH</A></B></CODE>
127
128 <BR>
129 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of bytes needed to store an int value (5).</TD>
130 </TR>
131 <TR BGCOLOR="white" CLASS="TableRowColor">
132 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133 <CODE>static&nbsp;int</CODE></FONT></TD>
134 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#MAX_LONG_LENGTH">MAX_LONG_LENGTH</A></B></CODE>
135
136 <BR>
137 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of bytes needed to store a long value (9).</TD>
138 </TR>
139 </TABLE>
140 &nbsp;
141 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
142
143 <A NAME="constructor_summary"><!-- --></A>
144 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
145 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
146 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
147 <B>Constructor Summary</B></FONT></TH>
148 </TR>
149 <TR BGCOLOR="white" CLASS="TableRowColor">
150 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#PackedInteger()">PackedInteger</A></B>()</CODE>
151
152 <BR>
153 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
154 </TR>
155 </TABLE>
156 &nbsp;
157 <!-- ========== METHOD SUMMARY =========== -->
158
159 <A NAME="method_summary"><!-- --></A>
160 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
161 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
162 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
163 <B>Method Summary</B></FONT></TH>
164 </TR>
165 <TR BGCOLOR="white" CLASS="TableRowColor">
166 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167 <CODE>static&nbsp;int</CODE></FONT></TD>
168 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getReadIntLength(byte[], int)">getReadIntLength</A></B>(byte[]&nbsp;buf,
169 int&nbsp;off)</CODE>
170
171 <BR>
172 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readInt(byte[], int)"><CODE>readInt(byte[], int)</CODE></A>.</TD>
173 </TR>
174 <TR BGCOLOR="white" CLASS="TableRowColor">
175 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176 <CODE>static&nbsp;int</CODE></FONT></TD>
177 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getReadLongLength(byte[], int)">getReadLongLength</A></B>(byte[]&nbsp;buf,
178 int&nbsp;off)</CODE>
179
180 <BR>
181 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readLong(byte[], int)"><CODE>readLong(byte[], int)</CODE></A>.</TD>
182 </TR>
183 <TR BGCOLOR="white" CLASS="TableRowColor">
184 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185 <CODE>static&nbsp;int</CODE></FONT></TD>
186 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getReadSortedIntLength(byte[], int)">getReadSortedIntLength</A></B>(byte[]&nbsp;buf,
187 int&nbsp;off)</CODE>
188
189 <BR>
190 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedInt(byte[], int)"><CODE>readSortedInt(byte[], int)</CODE></A>.</TD>
191 </TR>
192 <TR BGCOLOR="white" CLASS="TableRowColor">
193 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194 <CODE>static&nbsp;int</CODE></FONT></TD>
195 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getReadSortedLongLength(byte[], int)">getReadSortedLongLength</A></B>(byte[]&nbsp;buf,
196 int&nbsp;off)</CODE>
197
198 <BR>
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedLong(byte[], int)"><CODE>readSortedLong(byte[], int)</CODE></A>.</TD>
200 </TR>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>static&nbsp;int</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getWriteIntLength(int)">getWriteIntLength</A></B>(int&nbsp;value)</CODE>
205
206 <BR>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeInt(byte[], int, int)"><CODE>writeInt(byte[], int, int)</CODE></A>.</TD>
208 </TR>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>static&nbsp;int</CODE></FONT></TD>
212 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getWriteLongLength(long)">getWriteLongLength</A></B>(long&nbsp;value)</CODE>
213
214 <BR>
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeLong(byte[], int, long)"><CODE>writeLong(byte[], int, long)</CODE></A>.</TD>
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/util/PackedInteger.html#getWriteSortedIntLength(int)">getWriteSortedIntLength</A></B>(int&nbsp;value)</CODE>
221
222 <BR>
223 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedInt(byte[], int, int)"><CODE>writeSortedInt(byte[], int, int)</CODE></A>.</TD>
224 </TR>
225 <TR BGCOLOR="white" CLASS="TableRowColor">
226 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227 <CODE>static&nbsp;int</CODE></FONT></TD>
228 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#getWriteSortedLongLength(long)">getWriteSortedLongLength</A></B>(long&nbsp;value)</CODE>
229
230 <BR>
231 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedLong(byte[], int, long)"><CODE>writeSortedLong(byte[], int, long)</CODE></A>.</TD>
232 </TR>
233 <TR BGCOLOR="white" CLASS="TableRowColor">
234 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235 <CODE>static&nbsp;int</CODE></FONT></TD>
236 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#readInt(byte[], int)">readInt</A></B>(byte[]&nbsp;buf,
237 int&nbsp;off)</CODE>
238
239 <BR>
240 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a packed integer at the given buffer offset and returns it.</TD>
241 </TR>
242 <TR BGCOLOR="white" CLASS="TableRowColor">
243 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244 <CODE>static&nbsp;long</CODE></FONT></TD>
245 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#readLong(byte[], int)">readLong</A></B>(byte[]&nbsp;buf,
246 int&nbsp;off)</CODE>
247
248 <BR>
249 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a packed long integer at the given buffer offset and returns it.</TD>
250 </TR>
251 <TR BGCOLOR="white" CLASS="TableRowColor">
252 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
253 <CODE>static&nbsp;int</CODE></FONT></TD>
254 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedInt(byte[], int)">readSortedInt</A></B>(byte[]&nbsp;buf,
255 int&nbsp;off)</CODE>
256
257 <BR>
258 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a sorted packed integer at the given buffer offset and returns it.</TD>
259 </TR>
260 <TR BGCOLOR="white" CLASS="TableRowColor">
261 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
262 <CODE>static&nbsp;long</CODE></FONT></TD>
263 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedLong(byte[], int)">readSortedLong</A></B>(byte[]&nbsp;buf,
264 int&nbsp;off)</CODE>
265
266 <BR>
267 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a sorted packed long integer at the given buffer offset and
268 returns it.</TD>
269 </TR>
270 <TR BGCOLOR="white" CLASS="TableRowColor">
271 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
272 <CODE>static&nbsp;int</CODE></FONT></TD>
273 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#writeInt(byte[], int, int)">writeInt</A></B>(byte[]&nbsp;buf,
274 int&nbsp;offset,
275 int&nbsp;value)</CODE>
276
277 <BR>
278 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed integer starting at the given buffer offset and returns
279 the next offset to be written.</TD>
280 </TR>
281 <TR BGCOLOR="white" CLASS="TableRowColor">
282 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
283 <CODE>static&nbsp;int</CODE></FONT></TD>
284 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#writeLong(byte[], int, long)">writeLong</A></B>(byte[]&nbsp;buf,
285 int&nbsp;offset,
286 long&nbsp;value)</CODE>
287
288 <BR>
289 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed long integer starting at the given buffer offset and
290 returns the next offset to be written.</TD>
291 </TR>
292 <TR BGCOLOR="white" CLASS="TableRowColor">
293 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
294 <CODE>static&nbsp;int</CODE></FONT></TD>
295 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedInt(byte[], int, int)">writeSortedInt</A></B>(byte[]&nbsp;buf,
296 int&nbsp;offset,
297 int&nbsp;value)</CODE>
298
299 <BR>
300 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed sorted integer starting at the given buffer offset and
301 returns the next offset to be written.</TD>
302 </TR>
303 <TR BGCOLOR="white" CLASS="TableRowColor">
304 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
305 <CODE>static&nbsp;int</CODE></FONT></TD>
306 <TD><CODE><B><A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedLong(byte[], int, long)">writeSortedLong</A></B>(byte[]&nbsp;buf,
307 int&nbsp;offset,
308 long&nbsp;value)</CODE>
309
310 <BR>
311 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a packed sorted long integer starting at the given buffer offset
312 and returns the next offset to be written.</TD>
313 </TR>
314 </TABLE>
315 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
316 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
317 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
318 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
319 </TR>
320 <TR BGCOLOR="white" CLASS="TableRowColor">
321 <TD><CODE><A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/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://download.oracle.com/javase/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://download.oracle.com/javase/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>
322 </TR>
323 </TABLE>
324 &nbsp;
325 <P>
326
327 <!-- ============ FIELD DETAIL =========== -->
328
329 <A NAME="field_detail"><!-- --></A>
330 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
331 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
332 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
333 <B>Field Detail</B></FONT></TH>
334 </TR>
335 </TABLE>
336
337 <A NAME="MAX_LENGTH"><!-- --></A><H3>
338 MAX_LENGTH</H3>
339 <PRE>
340 public static final int <B>MAX_LENGTH</B></PRE>
341 <DL>
342 <DD>The maximum number of bytes needed to store an int value (5).
343 <P>
344 <DL>
345 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.PackedInteger.MAX_LENGTH">Constant Field Values</A></DL>
346 </DL>
347 <HR>
348
349 <A NAME="MAX_LONG_LENGTH"><!-- --></A><H3>
350 MAX_LONG_LENGTH</H3>
351 <PRE>
352 public static final int <B>MAX_LONG_LENGTH</B></PRE>
353 <DL>
354 <DD>The maximum number of bytes needed to store a long value (9).
355 <P>
356 <DL>
357 <DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#com.sleepycat.util.PackedInteger.MAX_LONG_LENGTH">Constant Field Values</A></DL>
358 </DL>
359
360 <!-- ========= CONSTRUCTOR DETAIL ======== -->
361
362 <A NAME="constructor_detail"><!-- --></A>
363 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
364 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
365 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
366 <B>Constructor Detail</B></FONT></TH>
367 </TR>
368 </TABLE>
369
370 <A NAME="PackedInteger()"><!-- --></A><H3>
371 PackedInteger</H3>
372 <PRE>
373 public <B>PackedInteger</B>()</PRE>
374 <DL>
375 </DL>
376
377 <!-- ============ METHOD DETAIL ========== -->
378
379 <A NAME="method_detail"><!-- --></A>
380 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
381 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
382 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
383 <B>Method Detail</B></FONT></TH>
384 </TR>
385 </TABLE>
386
387 <A NAME="readInt(byte[], int)"><!-- --></A><H3>
388 readInt</H3>
389 <PRE>
390 public static int <B>readInt</B>(byte[]&nbsp;buf,
391 int&nbsp;off)</PRE>
392 <DL>
393 <DD>Reads a packed integer at the given buffer offset and returns it.
394 <P>
395 <DD><DL>
396 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
397 <DT><B>Returns:</B><DD>the integer that was read.</DL>
398 </DD>
399 </DL>
400 <HR>
401
402 <A NAME="readLong(byte[], int)"><!-- --></A><H3>
403 readLong</H3>
404 <PRE>
405 public static long <B>readLong</B>(byte[]&nbsp;buf,
406 int&nbsp;off)</PRE>
407 <DL>
408 <DD>Reads a packed long integer at the given buffer offset and returns it.
409 <P>
410 <DD><DL>
411 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
412 <DT><B>Returns:</B><DD>the long integer that was read.</DL>
413 </DD>
414 </DL>
415 <HR>
416
417 <A NAME="getReadIntLength(byte[], int)"><!-- --></A><H3>
418 getReadIntLength</H3>
419 <PRE>
420 public static int <B>getReadIntLength</B>(byte[]&nbsp;buf,
421 int&nbsp;off)</PRE>
422 <DL>
423 <DD>Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readInt(byte[], int)"><CODE>readInt(byte[], int)</CODE></A>.
424
425 <p>Because the length is stored in the first byte, this method may be
426 called with only the first byte of the packed integer in the given
427 buffer. This method only accesses one byte at the given offset.</p>
428 <P>
429 <DD><DL>
430 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
431 <DT><B>Returns:</B><DD>the number of bytes that would be read.</DL>
432 </DD>
433 </DL>
434 <HR>
435
436 <A NAME="getReadLongLength(byte[], int)"><!-- --></A><H3>
437 getReadLongLength</H3>
438 <PRE>
439 public static int <B>getReadLongLength</B>(byte[]&nbsp;buf,
440 int&nbsp;off)</PRE>
441 <DL>
442 <DD>Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readLong(byte[], int)"><CODE>readLong(byte[], int)</CODE></A>.
443
444 <p>Because the length is stored in the first byte, this method may be
445 called with only the first byte of the packed integer in the given
446 buffer. This method only accesses one byte at the given offset.</p>
447 <P>
448 <DD><DL>
449 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
450 <DT><B>Returns:</B><DD>the number of bytes that would be read.</DL>
451 </DD>
452 </DL>
453 <HR>
454
455 <A NAME="writeInt(byte[], int, int)"><!-- --></A><H3>
456 writeInt</H3>
457 <PRE>
458 public static int <B>writeInt</B>(byte[]&nbsp;buf,
459 int&nbsp;offset,
460 int&nbsp;value)</PRE>
461 <DL>
462 <DD>Writes a packed integer starting at the given buffer offset and returns
463 the next offset to be written.
464 <P>
465 <DD><DL>
466 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to write to.<DD><CODE>offset</CODE> - the offset in the buffer at which to start writing.<DD><CODE>value</CODE> - the integer to be written.
467 <DT><B>Returns:</B><DD>the offset past the bytes written.</DL>
468 </DD>
469 </DL>
470 <HR>
471
472 <A NAME="writeLong(byte[], int, long)"><!-- --></A><H3>
473 writeLong</H3>
474 <PRE>
475 public static int <B>writeLong</B>(byte[]&nbsp;buf,
476 int&nbsp;offset,
477 long&nbsp;value)</PRE>
478 <DL>
479 <DD>Writes a packed long integer starting at the given buffer offset and
480 returns the next offset to be written.
481 <P>
482 <DD><DL>
483 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to write to.<DD><CODE>offset</CODE> - the offset in the buffer at which to start writing.<DD><CODE>value</CODE> - the long integer to be written.
484 <DT><B>Returns:</B><DD>the offset past the bytes written.</DL>
485 </DD>
486 </DL>
487 <HR>
488
489 <A NAME="getWriteIntLength(int)"><!-- --></A><H3>
490 getWriteIntLength</H3>
491 <PRE>
492 public static int <B>getWriteIntLength</B>(int&nbsp;value)</PRE>
493 <DL>
494 <DD>Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeInt(byte[], int, int)"><CODE>writeInt(byte[], int, int)</CODE></A>.
495 <P>
496 <DD><DL>
497 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the integer to be written.
498 <DT><B>Returns:</B><DD>the number of bytes that would be used to write the given
499 integer.</DL>
500 </DD>
501 </DL>
502 <HR>
503
504 <A NAME="getWriteLongLength(long)"><!-- --></A><H3>
505 getWriteLongLength</H3>
506 <PRE>
507 public static int <B>getWriteLongLength</B>(long&nbsp;value)</PRE>
508 <DL>
509 <DD>Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeLong(byte[], int, long)"><CODE>writeLong(byte[], int, long)</CODE></A>.
510 <P>
511 <DD><DL>
512 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the long integer to be written.
513 <DT><B>Returns:</B><DD>the number of bytes that would be used to write the given long
514 integer.</DL>
515 </DD>
516 </DL>
517 <HR>
518
519 <A NAME="readSortedInt(byte[], int)"><!-- --></A><H3>
520 readSortedInt</H3>
521 <PRE>
522 public static int <B>readSortedInt</B>(byte[]&nbsp;buf,
523 int&nbsp;off)</PRE>
524 <DL>
525 <DD>Reads a sorted packed integer at the given buffer offset and returns it.
526 <P>
527 <DD><DL>
528 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
529 <DT><B>Returns:</B><DD>the integer that was read.</DL>
530 </DD>
531 </DL>
532 <HR>
533
534 <A NAME="readSortedLong(byte[], int)"><!-- --></A><H3>
535 readSortedLong</H3>
536 <PRE>
537 public static long <B>readSortedLong</B>(byte[]&nbsp;buf,
538 int&nbsp;off)</PRE>
539 <DL>
540 <DD>Reads a sorted packed long integer at the given buffer offset and
541 returns it.
542 <P>
543 <DD><DL>
544 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
545 <DT><B>Returns:</B><DD>the long integer that was read.</DL>
546 </DD>
547 </DL>
548 <HR>
549
550 <A NAME="getReadSortedIntLength(byte[], int)"><!-- --></A><H3>
551 getReadSortedIntLength</H3>
552 <PRE>
553 public static int <B>getReadSortedIntLength</B>(byte[]&nbsp;buf,
554 int&nbsp;off)</PRE>
555 <DL>
556 <DD>Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedInt(byte[], int)"><CODE>readSortedInt(byte[], int)</CODE></A>.
557
558 <p>Because the length is stored in the first byte, this method may be
559 called with only the first byte of the packed integer in the given
560 buffer. This method only accesses one byte at the given offset.</p>
561 <P>
562 <DD><DL>
563 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
564 <DT><B>Returns:</B><DD>the number of bytes that would be read.</DL>
565 </DD>
566 </DL>
567 <HR>
568
569 <A NAME="getReadSortedLongLength(byte[], int)"><!-- --></A><H3>
570 getReadSortedLongLength</H3>
571 <PRE>
572 public static int <B>getReadSortedLongLength</B>(byte[]&nbsp;buf,
573 int&nbsp;off)</PRE>
574 <DL>
575 <DD>Returns the number of bytes that would be read by <A HREF="../../../com/sleepycat/util/PackedInteger.html#readSortedLong(byte[], int)"><CODE>readSortedLong(byte[], int)</CODE></A>.
576
577 <p>Because the length is stored in the first byte, this method may be
578 called with only the first byte of the packed integer in the given
579 buffer. This method only accesses one byte at the given offset.</p>
580 <P>
581 <DD><DL>
582 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to read from.<DD><CODE>off</CODE> - the offset in the buffer at which to start reading.
583 <DT><B>Returns:</B><DD>the number of bytes that would be read.</DL>
584 </DD>
585 </DL>
586 <HR>
587
588 <A NAME="writeSortedInt(byte[], int, int)"><!-- --></A><H3>
589 writeSortedInt</H3>
590 <PRE>
591 public static int <B>writeSortedInt</B>(byte[]&nbsp;buf,
592 int&nbsp;offset,
593 int&nbsp;value)</PRE>
594 <DL>
595 <DD>Writes a packed sorted integer starting at the given buffer offset and
596 returns the next offset to be written.
597 <P>
598 <DD><DL>
599 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to write to.<DD><CODE>offset</CODE> - the offset in the buffer at which to start writing.<DD><CODE>value</CODE> - the integer to be written.
600 <DT><B>Returns:</B><DD>the offset past the bytes written.</DL>
601 </DD>
602 </DL>
603 <HR>
604
605 <A NAME="writeSortedLong(byte[], int, long)"><!-- --></A><H3>
606 writeSortedLong</H3>
607 <PRE>
608 public static int <B>writeSortedLong</B>(byte[]&nbsp;buf,
609 int&nbsp;offset,
610 long&nbsp;value)</PRE>
611 <DL>
612 <DD>Writes a packed sorted long integer starting at the given buffer offset
613 and returns the next offset to be written.
614 <P>
615 <DD><DL>
616 <DT><B>Parameters:</B><DD><CODE>buf</CODE> - the buffer to write to.<DD><CODE>offset</CODE> - the offset in the buffer at which to start writing.<DD><CODE>value</CODE> - the long integer to be written.
617 <DT><B>Returns:</B><DD>the offset past the bytes written.</DL>
618 </DD>
619 </DL>
620 <HR>
621
622 <A NAME="getWriteSortedIntLength(int)"><!-- --></A><H3>
623 getWriteSortedIntLength</H3>
624 <PRE>
625 public static int <B>getWriteSortedIntLength</B>(int&nbsp;value)</PRE>
626 <DL>
627 <DD>Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedInt(byte[], int, int)"><CODE>writeSortedInt(byte[], int, int)</CODE></A>.
628 <P>
629 <DD><DL>
630 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the integer to be written.
631 <DT><B>Returns:</B><DD>the number of bytes that would be used to write the given
632 integer.</DL>
633 </DD>
634 </DL>
635 <HR>
636
637 <A NAME="getWriteSortedLongLength(long)"><!-- --></A><H3>
638 getWriteSortedLongLength</H3>
639 <PRE>
640 public static int <B>getWriteSortedLongLength</B>(long&nbsp;value)</PRE>
641 <DL>
642 <DD>Returns the number of bytes that would be written by <A HREF="../../../com/sleepycat/util/PackedInteger.html#writeSortedLong(byte[], int, long)"><CODE>writeSortedLong(byte[], int, long)</CODE></A>.
643 <P>
644 <DD><DL>
645 <DT><B>Parameters:</B><DD><CODE>value</CODE> - the long integer to be written.
646 <DT><B>Returns:</B><DD>the number of bytes that would be used to write the given long
647 integer.</DL>
648 </DD>
649 </DL>
650 <!-- ========= END OF CLASS DATA ========= -->
651 <HR>
652
653
654 <!-- ======= START OF BOTTOM NAVBAR ====== -->
655 <A NAME="navbar_bottom"><!-- --></A>
656 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
657 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
658 <TR>
659 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
660 <A NAME="navbar_bottom_firstrow"><!-- --></A>
661 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
662 <TR ALIGN="center" VALIGN="top">
663 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
664 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
665 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
666 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/PackedInteger.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
667 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
668 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
669 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
670 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
671 </TR>
672 </TABLE>
673 </TD>
674 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
675 <b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
676 </TD>
677 </TR>
678
679 <TR>
680 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
681 &nbsp;<A HREF="../../../com/sleepycat/util/IOExceptionWrapper.html" title="class in com.sleepycat.util"><B>PREV CLASS</B></A>&nbsp;
682 &nbsp;<A HREF="../../../com/sleepycat/util/RuntimeExceptionWrapper.html" title="class in com.sleepycat.util"><B>NEXT CLASS</B></A></FONT></TD>
683 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
684 <A HREF="../../../index.html?com/sleepycat/util/PackedInteger.html" target="_top"><B>FRAMES</B></A> &nbsp;
685 &nbsp;<A HREF="PackedInteger.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
686 &nbsp;<SCRIPT type="text/javascript">
687 <!--
688 if(window==top) {
689 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
690 }
691 //-->
692 </SCRIPT>
693 <NOSCRIPT>
694 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
695 </NOSCRIPT>
696
697
698 </FONT></TD>
699 </TR>
700 <TR>
701 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
702 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
703 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
704 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
705 </TR>
706 </TABLE>
707 <A NAME="skip-navbar_bottom"></A>
708 <!-- ======== END OF BOTTOM NAVBAR ======= -->
709
710 <HR>
711 <font size=1>Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.</font>
712 </BODY>
713 </HTML>