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_07) on Tue Sep 01 20:56:55 UTC 2009 --> |
---|
6 | <TITLE> |
---|
7 | Utils (Hadoop 0.20.1 API) |
---|
8 | </TITLE> |
---|
9 | |
---|
10 | <META NAME="date" CONTENT="2009-09-01"> |
---|
11 | |
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.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="Utils (Hadoop 0.20.1 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> </TD> |
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Utils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
48 | </TR> |
---|
49 | </TABLE> |
---|
50 | </TD> |
---|
51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
52 | </EM> |
---|
53 | </TD> |
---|
54 | </TR> |
---|
55 | |
---|
56 | <TR> |
---|
57 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
58 | <A HREF="../../../../org/apache/hadoop/record/RecordOutput.html" title="interface in org.apache.hadoop.record"><B>PREV CLASS</B></A> |
---|
59 | <A HREF="../../../../org/apache/hadoop/record/XmlRecordInput.html" title="class in org.apache.hadoop.record"><B>NEXT CLASS</B></A></FONT></TD> |
---|
60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
61 | <A HREF="../../../../index.html?org/apache/hadoop/record/Utils.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="Utils.html" target="_top"><B>NO FRAMES</B></A> |
---|
63 | <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: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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 | org.apache.hadoop.record</FONT> |
---|
92 | <BR> |
---|
93 | Class Utils</H2> |
---|
94 | <PRE> |
---|
95 | <A HREF="http://java.sun.com/javase/6/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>org.apache.hadoop.record.Utils</B> |
---|
97 | </PRE> |
---|
98 | <HR> |
---|
99 | <DL> |
---|
100 | <DT><PRE>public class <B>Utils</B><DT>extends <A HREF="http://java.sun.com/javase/6/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 | Various utility functions for Hadooop record I/O runtime. |
---|
105 | <P> |
---|
106 | |
---|
107 | <P> |
---|
108 | <HR> |
---|
109 | |
---|
110 | <P> |
---|
111 | <!-- =========== FIELD SUMMARY =========== --> |
---|
112 | |
---|
113 | <A NAME="field_summary"><!-- --></A> |
---|
114 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
115 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
116 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
117 | <B>Field Summary</B></FONT></TH> |
---|
118 | </TR> |
---|
119 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
120 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
121 | <CODE>static char[]</CODE></FONT></TD> |
---|
122 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#hexchars">hexchars</A></B></CODE> |
---|
123 | |
---|
124 | <BR> |
---|
125 | </TD> |
---|
126 | </TR> |
---|
127 | </TABLE> |
---|
128 | |
---|
129 | <!-- ========== METHOD SUMMARY =========== --> |
---|
130 | |
---|
131 | <A NAME="method_summary"><!-- --></A> |
---|
132 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
133 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
134 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
135 | <B>Method Summary</B></FONT></TH> |
---|
136 | </TR> |
---|
137 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
138 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
139 | <CODE>static int</CODE></FONT></TD> |
---|
140 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#compareBytes(byte[], int, int, byte[], int, int)">compareBytes</A></B>(byte[] b1, |
---|
141 | int s1, |
---|
142 | int l1, |
---|
143 | byte[] b2, |
---|
144 | int s2, |
---|
145 | int l2)</CODE> |
---|
146 | |
---|
147 | <BR> |
---|
148 | Lexicographic order of binary data.</TD> |
---|
149 | </TR> |
---|
150 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
151 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
152 | <CODE>static int</CODE></FONT></TD> |
---|
153 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#getVIntSize(long)">getVIntSize</A></B>(long i)</CODE> |
---|
154 | |
---|
155 | <BR> |
---|
156 | Get the encoded length if an integer is stored in a variable-length format</TD> |
---|
157 | </TR> |
---|
158 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
159 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
160 | <CODE>static double</CODE></FONT></TD> |
---|
161 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readDouble(byte[], int)">readDouble</A></B>(byte[] bytes, |
---|
162 | int start)</CODE> |
---|
163 | |
---|
164 | <BR> |
---|
165 | Parse a double from a byte array.</TD> |
---|
166 | </TR> |
---|
167 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
168 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
169 | <CODE>static float</CODE></FONT></TD> |
---|
170 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readFloat(byte[], int)">readFloat</A></B>(byte[] bytes, |
---|
171 | int start)</CODE> |
---|
172 | |
---|
173 | <BR> |
---|
174 | Parse a float from a byte array.</TD> |
---|
175 | </TR> |
---|
176 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
177 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
178 | <CODE>static int</CODE></FONT></TD> |
---|
179 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readVInt(byte[], int)">readVInt</A></B>(byte[] bytes, |
---|
180 | int start)</CODE> |
---|
181 | |
---|
182 | <BR> |
---|
183 | Reads a zero-compressed encoded integer from a byte array and returns it.</TD> |
---|
184 | </TR> |
---|
185 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
186 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
187 | <CODE>static int</CODE></FONT></TD> |
---|
188 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readVInt(java.io.DataInput)">readVInt</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in)</CODE> |
---|
189 | |
---|
190 | <BR> |
---|
191 | Reads a zero-compressed encoded integer from a stream and returns it.</TD> |
---|
192 | </TR> |
---|
193 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
194 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
195 | <CODE>static long</CODE></FONT></TD> |
---|
196 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readVLong(byte[], int)">readVLong</A></B>(byte[] bytes, |
---|
197 | int start)</CODE> |
---|
198 | |
---|
199 | <BR> |
---|
200 | Reads a zero-compressed encoded long from a byte array and returns it.</TD> |
---|
201 | </TR> |
---|
202 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
203 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
204 | <CODE>static long</CODE></FONT></TD> |
---|
205 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#readVLong(java.io.DataInput)">readVLong</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in)</CODE> |
---|
206 | |
---|
207 | <BR> |
---|
208 | Reads a zero-compressed encoded long from a stream and return it.</TD> |
---|
209 | </TR> |
---|
210 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
211 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
212 | <CODE>static void</CODE></FONT></TD> |
---|
213 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#writeVInt(java.io.DataOutput, int)">writeVInt</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> stream, |
---|
214 | int i)</CODE> |
---|
215 | |
---|
216 | <BR> |
---|
217 | Serializes an int to a binary stream with zero-compressed encoding.</TD> |
---|
218 | </TR> |
---|
219 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
220 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
221 | <CODE>static void</CODE></FONT></TD> |
---|
222 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/record/Utils.html#writeVLong(java.io.DataOutput, long)">writeVLong</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> stream, |
---|
223 | long i)</CODE> |
---|
224 | |
---|
225 | <BR> |
---|
226 | Serializes a long to a binary stream with zero-compressed encoding.</TD> |
---|
227 | </TR> |
---|
228 | </TABLE> |
---|
229 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
230 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
231 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
232 | <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
---|
233 | </TR> |
---|
234 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
235 | <TD><CODE><A HREF="http://java.sun.com/javase/6/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/javase/6/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/javase/6/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/javase/6/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/javase/6/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/javase/6/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/javase/6/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/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/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/javase/6/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/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
---|
236 | </TR> |
---|
237 | </TABLE> |
---|
238 | |
---|
239 | <P> |
---|
240 | |
---|
241 | <!-- ============ FIELD DETAIL =========== --> |
---|
242 | |
---|
243 | <A NAME="field_detail"><!-- --></A> |
---|
244 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
245 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
246 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
247 | <B>Field Detail</B></FONT></TH> |
---|
248 | </TR> |
---|
249 | </TABLE> |
---|
250 | |
---|
251 | <A NAME="hexchars"><!-- --></A><H3> |
---|
252 | hexchars</H3> |
---|
253 | <PRE> |
---|
254 | public static final char[] <B>hexchars</B></PRE> |
---|
255 | <DL> |
---|
256 | <DL> |
---|
257 | </DL> |
---|
258 | </DL> |
---|
259 | |
---|
260 | <!-- ============ METHOD DETAIL ========== --> |
---|
261 | |
---|
262 | <A NAME="method_detail"><!-- --></A> |
---|
263 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
264 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
265 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
266 | <B>Method Detail</B></FONT></TH> |
---|
267 | </TR> |
---|
268 | </TABLE> |
---|
269 | |
---|
270 | <A NAME="readFloat(byte[], int)"><!-- --></A><H3> |
---|
271 | readFloat</H3> |
---|
272 | <PRE> |
---|
273 | public static float <B>readFloat</B>(byte[] bytes, |
---|
274 | int start)</PRE> |
---|
275 | <DL> |
---|
276 | <DD>Parse a float from a byte array. |
---|
277 | <P> |
---|
278 | <DD><DL> |
---|
279 | </DL> |
---|
280 | </DD> |
---|
281 | </DL> |
---|
282 | <HR> |
---|
283 | |
---|
284 | <A NAME="readDouble(byte[], int)"><!-- --></A><H3> |
---|
285 | readDouble</H3> |
---|
286 | <PRE> |
---|
287 | public static double <B>readDouble</B>(byte[] bytes, |
---|
288 | int start)</PRE> |
---|
289 | <DL> |
---|
290 | <DD>Parse a double from a byte array. |
---|
291 | <P> |
---|
292 | <DD><DL> |
---|
293 | </DL> |
---|
294 | </DD> |
---|
295 | </DL> |
---|
296 | <HR> |
---|
297 | |
---|
298 | <A NAME="readVLong(byte[], int)"><!-- --></A><H3> |
---|
299 | readVLong</H3> |
---|
300 | <PRE> |
---|
301 | public static long <B>readVLong</B>(byte[] bytes, |
---|
302 | int start) |
---|
303 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
304 | <DL> |
---|
305 | <DD>Reads a zero-compressed encoded long from a byte array and returns it. |
---|
306 | <P> |
---|
307 | <DD><DL> |
---|
308 | <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - byte array with decode long<DD><CODE>start</CODE> - starting index |
---|
309 | <DT><B>Returns:</B><DD>deserialized long |
---|
310 | <DT><B>Throws:</B> |
---|
311 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
312 | </DD> |
---|
313 | </DL> |
---|
314 | <HR> |
---|
315 | |
---|
316 | <A NAME="readVInt(byte[], int)"><!-- --></A><H3> |
---|
317 | readVInt</H3> |
---|
318 | <PRE> |
---|
319 | public static int <B>readVInt</B>(byte[] bytes, |
---|
320 | int start) |
---|
321 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
322 | <DL> |
---|
323 | <DD>Reads a zero-compressed encoded integer from a byte array and returns it. |
---|
324 | <P> |
---|
325 | <DD><DL> |
---|
326 | <DT><B>Parameters:</B><DD><CODE>bytes</CODE> - byte array with the encoded integer<DD><CODE>start</CODE> - start index |
---|
327 | <DT><B>Returns:</B><DD>deserialized integer |
---|
328 | <DT><B>Throws:</B> |
---|
329 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
330 | </DD> |
---|
331 | </DL> |
---|
332 | <HR> |
---|
333 | |
---|
334 | <A NAME="readVLong(java.io.DataInput)"><!-- --></A><H3> |
---|
335 | readVLong</H3> |
---|
336 | <PRE> |
---|
337 | public static long <B>readVLong</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in) |
---|
338 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
339 | <DL> |
---|
340 | <DD>Reads a zero-compressed encoded long from a stream and return it. |
---|
341 | <P> |
---|
342 | <DD><DL> |
---|
343 | <DT><B>Parameters:</B><DD><CODE>in</CODE> - input stream |
---|
344 | <DT><B>Returns:</B><DD>deserialized long |
---|
345 | <DT><B>Throws:</B> |
---|
346 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
347 | </DD> |
---|
348 | </DL> |
---|
349 | <HR> |
---|
350 | |
---|
351 | <A NAME="readVInt(java.io.DataInput)"><!-- --></A><H3> |
---|
352 | readVInt</H3> |
---|
353 | <PRE> |
---|
354 | public static int <B>readVInt</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A> in) |
---|
355 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
356 | <DL> |
---|
357 | <DD>Reads a zero-compressed encoded integer from a stream and returns it. |
---|
358 | <P> |
---|
359 | <DD><DL> |
---|
360 | <DT><B>Parameters:</B><DD><CODE>in</CODE> - input stream |
---|
361 | <DT><B>Returns:</B><DD>deserialized integer |
---|
362 | <DT><B>Throws:</B> |
---|
363 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
364 | </DD> |
---|
365 | </DL> |
---|
366 | <HR> |
---|
367 | |
---|
368 | <A NAME="getVIntSize(long)"><!-- --></A><H3> |
---|
369 | getVIntSize</H3> |
---|
370 | <PRE> |
---|
371 | public static int <B>getVIntSize</B>(long i)</PRE> |
---|
372 | <DL> |
---|
373 | <DD>Get the encoded length if an integer is stored in a variable-length format |
---|
374 | <P> |
---|
375 | <DD><DL> |
---|
376 | |
---|
377 | <DT><B>Returns:</B><DD>the encoded length</DL> |
---|
378 | </DD> |
---|
379 | </DL> |
---|
380 | <HR> |
---|
381 | |
---|
382 | <A NAME="writeVLong(java.io.DataOutput, long)"><!-- --></A><H3> |
---|
383 | writeVLong</H3> |
---|
384 | <PRE> |
---|
385 | public static void <B>writeVLong</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> stream, |
---|
386 | long i) |
---|
387 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
388 | <DL> |
---|
389 | <DD>Serializes a long to a binary stream with zero-compressed encoding. |
---|
390 | For -112 <= i <= 127, only one byte is used with the actual value. |
---|
391 | For other values of i, the first byte value indicates whether the |
---|
392 | long is positive or negative, and the number of bytes that follow. |
---|
393 | If the first byte value v is between -113 and -120, the following long |
---|
394 | is positive, with number of bytes that follow are -(v+112). |
---|
395 | If the first byte value v is between -121 and -128, the following long |
---|
396 | is negative, with number of bytes that follow are -(v+120). Bytes are |
---|
397 | stored in the high-non-zero-byte-first order. |
---|
398 | <P> |
---|
399 | <DD><DL> |
---|
400 | <DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary output stream<DD><CODE>i</CODE> - Long to be serialized |
---|
401 | <DT><B>Throws:</B> |
---|
402 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
403 | </DD> |
---|
404 | </DL> |
---|
405 | <HR> |
---|
406 | |
---|
407 | <A NAME="writeVInt(java.io.DataOutput, int)"><!-- --></A><H3> |
---|
408 | writeVInt</H3> |
---|
409 | <PRE> |
---|
410 | public static void <B>writeVInt</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A> stream, |
---|
411 | int i) |
---|
412 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
413 | <DL> |
---|
414 | <DD>Serializes an int to a binary stream with zero-compressed encoding. |
---|
415 | <P> |
---|
416 | <DD><DL> |
---|
417 | <DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary output stream<DD><CODE>i</CODE> - int to be serialized |
---|
418 | <DT><B>Throws:</B> |
---|
419 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
420 | </DD> |
---|
421 | </DL> |
---|
422 | <HR> |
---|
423 | |
---|
424 | <A NAME="compareBytes(byte[], int, int, byte[], int, int)"><!-- --></A><H3> |
---|
425 | compareBytes</H3> |
---|
426 | <PRE> |
---|
427 | public static int <B>compareBytes</B>(byte[] b1, |
---|
428 | int s1, |
---|
429 | int l1, |
---|
430 | byte[] b2, |
---|
431 | int s2, |
---|
432 | int l2)</PRE> |
---|
433 | <DL> |
---|
434 | <DD>Lexicographic order of binary data. |
---|
435 | <P> |
---|
436 | <DD><DL> |
---|
437 | </DL> |
---|
438 | </DD> |
---|
439 | </DL> |
---|
440 | <!-- ========= END OF CLASS DATA ========= --> |
---|
441 | <HR> |
---|
442 | |
---|
443 | |
---|
444 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
445 | <A NAME="navbar_bottom"><!-- --></A> |
---|
446 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
447 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
448 | <TR> |
---|
449 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
450 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
451 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
452 | <TR ALIGN="center" VALIGN="top"> |
---|
453 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
454 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
455 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
456 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Utils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
457 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
458 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
459 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
460 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
461 | </TR> |
---|
462 | </TABLE> |
---|
463 | </TD> |
---|
464 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
465 | </EM> |
---|
466 | </TD> |
---|
467 | </TR> |
---|
468 | |
---|
469 | <TR> |
---|
470 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
471 | <A HREF="../../../../org/apache/hadoop/record/RecordOutput.html" title="interface in org.apache.hadoop.record"><B>PREV CLASS</B></A> |
---|
472 | <A HREF="../../../../org/apache/hadoop/record/XmlRecordInput.html" title="class in org.apache.hadoop.record"><B>NEXT CLASS</B></A></FONT></TD> |
---|
473 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
474 | <A HREF="../../../../index.html?org/apache/hadoop/record/Utils.html" target="_top"><B>FRAMES</B></A> |
---|
475 | <A HREF="Utils.html" target="_top"><B>NO FRAMES</B></A> |
---|
476 | <SCRIPT type="text/javascript"> |
---|
477 | <!-- |
---|
478 | if(window==top) { |
---|
479 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
480 | } |
---|
481 | //--> |
---|
482 | </SCRIPT> |
---|
483 | <NOSCRIPT> |
---|
484 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
485 | </NOSCRIPT> |
---|
486 | |
---|
487 | |
---|
488 | </FONT></TD> |
---|
489 | </TR> |
---|
490 | <TR> |
---|
491 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
492 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
493 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
494 | DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
495 | </TR> |
---|
496 | </TABLE> |
---|
497 | <A NAME="skip-navbar_bottom"></A> |
---|
498 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
499 | |
---|
500 | <HR> |
---|
501 | Copyright © 2009 The Apache Software Foundation |
---|
502 | </BODY> |
---|
503 | </HTML> |
---|