source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/io/WritableUtils.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 46.3 KB
Line 
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:53 UTC 2009 -->
6<TITLE>
7WritableUtils (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">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="WritableUtils (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>&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/WritableUtils.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</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/io/WritableName.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;NEXT CLASS</FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/io/WritableUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="WritableUtils.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;FIELD&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">
91org.apache.hadoop.io</FONT>
92<BR>
93Class WritableUtils</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.io.WritableUtils</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public final class <B>WritableUtils</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<HR>
105
106<P>
107
108<!-- ======== CONSTRUCTOR SUMMARY ======== -->
109
110<A NAME="constructor_summary"><!-- --></A>
111<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
112<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
113<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
114<B>Constructor Summary</B></FONT></TH>
115</TR>
116<TR BGCOLOR="white" CLASS="TableRowColor">
117<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#WritableUtils()">WritableUtils</A></B>()</CODE>
118
119<BR>
120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
121</TR>
122</TABLE>
123&nbsp;
124<!-- ========== METHOD SUMMARY =========== -->
125
126<A NAME="method_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
130<B>Method Summary</B></FONT></TH>
131</TR>
132<TR BGCOLOR="white" CLASS="TableRowColor">
133<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134<CODE>static
135<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
136<TR ALIGN="right" VALIGN="">
137<TD NOWRAP><FONT SIZE="-1">
138<CODE>&lt;T extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt; 
139<BR>
140T</CODE></FONT></TD>
141</TR>
142</TABLE>
143</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#clone(T, org.apache.hadoop.conf.Configuration)">clone</A></B>(T&nbsp;orig,
145      <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make a copy of a writable object using serialization to a buffer.</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>static&nbsp;void</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#cloneInto(org.apache.hadoop.io.Writable, org.apache.hadoop.io.Writable)">cloneInto</A></B>(<A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&nbsp;dst,
154          <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&nbsp;src)</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>use ReflectionUtils.cloneInto instead.</I></TD>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>static&nbsp;int</CODE></FONT></TD>
162<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#decodeVIntSize(byte)">decodeVIntSize</A></B>(byte&nbsp;value)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the first byte of a vint/vlong to determine the number of bytes</TD>
166</TR>
167<TR BGCOLOR="white" CLASS="TableRowColor">
168<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
169<CODE>static&nbsp;void</CODE></FONT></TD>
170<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#displayByteArray(byte[])">displayByteArray</A></B>(byte[]&nbsp;record)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177<CODE>static&nbsp;int</CODE></FONT></TD>
178<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#getVIntSize(long)">getVIntSize</A></B>(long&nbsp;i)</CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the encoded length if an integer is stored in a variable-length format</TD>
182</TR>
183<TR BGCOLOR="white" CLASS="TableRowColor">
184<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
185<CODE>static&nbsp;boolean</CODE></FONT></TD>
186<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#isNegativeVInt(byte)">isNegativeVInt</A></B>(byte&nbsp;value)</CODE>
187
188<BR>
189&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Given the first byte of a vint/vlong, determine the sign</TD>
190</TR>
191<TR BGCOLOR="white" CLASS="TableRowColor">
192<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
193<CODE>static&nbsp;byte[]</CODE></FONT></TD>
194<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readCompressedByteArray(java.io.DataInput)">readCompressedByteArray</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>&nbsp;in)</CODE>
195
196<BR>
197&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
201<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
202<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readCompressedString(java.io.DataInput)">readCompressedString</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>&nbsp;in)</CODE>
203
204<BR>
205&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
206</TR>
207<TR BGCOLOR="white" CLASS="TableRowColor">
208<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
209<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
210<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readCompressedStringArray(java.io.DataInput)">readCompressedStringArray</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>&nbsp;in)</CODE>
211
212<BR>
213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
214</TR>
215<TR BGCOLOR="white" CLASS="TableRowColor">
216<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
217<CODE>static
218<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
219<TR ALIGN="right" VALIGN="">
220<TD NOWRAP><FONT SIZE="-1">
221<CODE>&lt;T extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;T&gt;&gt; 
222<BR>
223T</CODE></FONT></TD>
224</TR>
225</TABLE>
226</CODE></FONT></TD>
227<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readEnum(java.io.DataInput, java.lang.Class)">readEnum</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>&nbsp;in,
228         <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;enumType)</CODE>
229
230<BR>
231&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read an Enum value from DataInput, Enums are read and written
232 using String values.</TD>
233</TR>
234<TR BGCOLOR="white" CLASS="TableRowColor">
235<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
236<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
237<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readString(java.io.DataInput)">readString</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>&nbsp;in)</CODE>
238
239<BR>
240&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
241</TR>
242<TR BGCOLOR="white" CLASS="TableRowColor">
243<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
244<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
245<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#readStringArray(java.io.DataInput)">readStringArray</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>&nbsp;in)</CODE>
246
247<BR>
248&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
252<CODE>static&nbsp;int</CODE></FONT></TD>
253<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.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>&nbsp;stream)</CODE>
254
255<BR>
256&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a zero-compressed encoded integer from input stream and returns it.</TD>
257</TR>
258<TR BGCOLOR="white" CLASS="TableRowColor">
259<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260<CODE>static&nbsp;long</CODE></FONT></TD>
261<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.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>&nbsp;stream)</CODE>
262
263<BR>
264&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reads a zero-compressed encoded long from input stream and returns it.</TD>
265</TR>
266<TR BGCOLOR="white" CLASS="TableRowColor">
267<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
268<CODE>static&nbsp;void</CODE></FONT></TD>
269<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#skipCompressedByteArray(java.io.DataInput)">skipCompressedByteArray</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>&nbsp;in)</CODE>
270
271<BR>
272&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
273</TR>
274<TR BGCOLOR="white" CLASS="TableRowColor">
275<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
276<CODE>static&nbsp;void</CODE></FONT></TD>
277<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#skipFully(java.io.DataInput, int)">skipFully</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>&nbsp;in,
278          int&nbsp;len)</CODE>
279
280<BR>
281&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Skip <i>len</i> number of bytes in input stream<i>in</i></TD>
282</TR>
283<TR BGCOLOR="white" CLASS="TableRowColor">
284<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
285<CODE>static&nbsp;byte[]</CODE></FONT></TD>
286<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#toByteArray(org.apache.hadoop.io.Writable...)">toByteArray</A></B>(<A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>...&nbsp;writables)</CODE>
287
288<BR>
289&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert writables to a byte array</TD>
290</TR>
291<TR BGCOLOR="white" CLASS="TableRowColor">
292<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
293<CODE>static&nbsp;int</CODE></FONT></TD>
294<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeCompressedByteArray(java.io.DataOutput, byte[])">writeCompressedByteArray</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>&nbsp;out,
295                         byte[]&nbsp;bytes)</CODE>
296
297<BR>
298&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
299</TR>
300<TR BGCOLOR="white" CLASS="TableRowColor">
301<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
302<CODE>static&nbsp;int</CODE></FONT></TD>
303<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeCompressedString(java.io.DataOutput, java.lang.String)">writeCompressedString</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>&nbsp;out,
304                      <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
305
306<BR>
307&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
308</TR>
309<TR BGCOLOR="white" CLASS="TableRowColor">
310<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
311<CODE>static&nbsp;void</CODE></FONT></TD>
312<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeCompressedStringArray(java.io.DataOutput, java.lang.String[])">writeCompressedStringArray</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>&nbsp;out,
313                           <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;s)</CODE>
314
315<BR>
316&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
317</TR>
318<TR BGCOLOR="white" CLASS="TableRowColor">
319<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
320<CODE>static&nbsp;void</CODE></FONT></TD>
321<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeEnum(java.io.DataOutput, java.lang.Enum)">writeEnum</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>&nbsp;out,
322          <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;?&gt;&nbsp;enumVal)</CODE>
323
324<BR>
325&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;writes String value of enum to DataOutput.</TD>
326</TR>
327<TR BGCOLOR="white" CLASS="TableRowColor">
328<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
329<CODE>static&nbsp;void</CODE></FONT></TD>
330<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeString(java.io.DataOutput, java.lang.String)">writeString</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>&nbsp;out,
331            <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
332
333<BR>
334&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
335</TR>
336<TR BGCOLOR="white" CLASS="TableRowColor">
337<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
338<CODE>static&nbsp;void</CODE></FONT></TD>
339<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#writeStringArray(java.io.DataOutput, java.lang.String[])">writeStringArray</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>&nbsp;out,
340                 <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;s)</CODE>
341
342<BR>
343&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
344</TR>
345<TR BGCOLOR="white" CLASS="TableRowColor">
346<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
347<CODE>static&nbsp;void</CODE></FONT></TD>
348<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.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>&nbsp;stream,
349          int&nbsp;i)</CODE>
350
351<BR>
352&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes an integer to a binary stream with zero-compressed encoding.</TD>
353</TR>
354<TR BGCOLOR="white" CLASS="TableRowColor">
355<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
356<CODE>static&nbsp;void</CODE></FONT></TD>
357<TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.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>&nbsp;stream,
358           long&nbsp;i)</CODE>
359
360<BR>
361&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serializes a long to a binary stream with zero-compressed encoding.</TD>
362</TR>
363</TABLE>
364&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
365<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
366<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
367<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>
368</TR>
369<TR BGCOLOR="white" CLASS="TableRowColor">
370<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>
371</TR>
372</TABLE>
373&nbsp;
374<P>
375
376<!-- ========= CONSTRUCTOR DETAIL ======== -->
377
378<A NAME="constructor_detail"><!-- --></A>
379<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
380<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
381<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
382<B>Constructor Detail</B></FONT></TH>
383</TR>
384</TABLE>
385
386<A NAME="WritableUtils()"><!-- --></A><H3>
387WritableUtils</H3>
388<PRE>
389public <B>WritableUtils</B>()</PRE>
390<DL>
391</DL>
392
393<!-- ============ METHOD DETAIL ========== -->
394
395<A NAME="method_detail"><!-- --></A>
396<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
397<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
398<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
399<B>Method Detail</B></FONT></TH>
400</TR>
401</TABLE>
402
403<A NAME="readCompressedByteArray(java.io.DataInput)"><!-- --></A><H3>
404readCompressedByteArray</H3>
405<PRE>
406public static byte[] <B>readCompressedByteArray</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>&nbsp;in)
407                                      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>
408<DL>
409<DD><DL>
410
411<DT><B>Throws:</B>
412<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>
413</DD>
414</DL>
415<HR>
416
417<A NAME="skipCompressedByteArray(java.io.DataInput)"><!-- --></A><H3>
418skipCompressedByteArray</H3>
419<PRE>
420public static void <B>skipCompressedByteArray</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>&nbsp;in)
421                                    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>
422<DL>
423<DD><DL>
424
425<DT><B>Throws:</B>
426<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>
427</DD>
428</DL>
429<HR>
430
431<A NAME="writeCompressedByteArray(java.io.DataOutput, byte[])"><!-- --></A><H3>
432writeCompressedByteArray</H3>
433<PRE>
434public static int <B>writeCompressedByteArray</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>&nbsp;out,
435                                           byte[]&nbsp;bytes)
436                                    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>
437<DL>
438<DD><DL>
439
440<DT><B>Throws:</B>
441<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>
442</DD>
443</DL>
444<HR>
445
446<A NAME="readCompressedString(java.io.DataInput)"><!-- --></A><H3>
447readCompressedString</H3>
448<PRE>
449public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>readCompressedString</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>&nbsp;in)
450                                   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>
451<DL>
452<DD><DL>
453
454<DT><B>Throws:</B>
455<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>
456</DD>
457</DL>
458<HR>
459
460<A NAME="writeCompressedString(java.io.DataOutput, java.lang.String)"><!-- --></A><H3>
461writeCompressedString</H3>
462<PRE>
463public static int <B>writeCompressedString</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>&nbsp;out,
464                                        <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)
465                                 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>
466<DL>
467<DD><DL>
468
469<DT><B>Throws:</B>
470<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>
471</DD>
472</DL>
473<HR>
474
475<A NAME="writeString(java.io.DataOutput, java.lang.String)"><!-- --></A><H3>
476writeString</H3>
477<PRE>
478public static void <B>writeString</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>&nbsp;out,
479                               <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)
480                        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>
481<DL>
482<DD><DL>
483
484<DT><B>Throws:</B>
485<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>
486</DD>
487</DL>
488<HR>
489
490<A NAME="readString(java.io.DataInput)"><!-- --></A><H3>
491readString</H3>
492<PRE>
493public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>readString</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>&nbsp;in)
494                         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>
495<DL>
496<DD><DL>
497
498<DT><B>Throws:</B>
499<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>
500</DD>
501</DL>
502<HR>
503
504<A NAME="writeStringArray(java.io.DataOutput, java.lang.String[])"><!-- --></A><H3>
505writeStringArray</H3>
506<PRE>
507public static void <B>writeStringArray</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>&nbsp;out,
508                                    <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;s)
509                             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>
510<DL>
511<DD><DL>
512
513<DT><B>Throws:</B>
514<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>
515</DD>
516</DL>
517<HR>
518
519<A NAME="writeCompressedStringArray(java.io.DataOutput, java.lang.String[])"><!-- --></A><H3>
520writeCompressedStringArray</H3>
521<PRE>
522public static void <B>writeCompressedStringArray</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>&nbsp;out,
523                                              <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;s)
524                                       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>
525<DL>
526<DD><DL>
527
528<DT><B>Throws:</B>
529<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>
530</DD>
531</DL>
532<HR>
533
534<A NAME="readStringArray(java.io.DataInput)"><!-- --></A><H3>
535readStringArray</H3>
536<PRE>
537public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>readStringArray</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>&nbsp;in)
538                                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>
539<DL>
540<DD><DL>
541
542<DT><B>Throws:</B>
543<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>
544</DD>
545</DL>
546<HR>
547
548<A NAME="readCompressedStringArray(java.io.DataInput)"><!-- --></A><H3>
549readCompressedStringArray</H3>
550<PRE>
551public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] <B>readCompressedStringArray</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>&nbsp;in)
552                                          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>
553<DL>
554<DD><DL>
555
556<DT><B>Throws:</B>
557<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>
558</DD>
559</DL>
560<HR>
561
562<A NAME="displayByteArray(byte[])"><!-- --></A><H3>
563displayByteArray</H3>
564<PRE>
565public static void <B>displayByteArray</B>(byte[]&nbsp;record)</PRE>
566<DL>
567<DD><DL>
568</DL>
569</DD>
570</DL>
571<HR>
572
573<A NAME="clone(org.apache.hadoop.io.Writable,org.apache.hadoop.conf.Configuration)"><!-- --></A><A NAME="clone(T, org.apache.hadoop.conf.Configuration)"><!-- --></A><H3>
574clone</H3>
575<PRE>
576public static &lt;T extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&gt; T <B>clone</B>(T&nbsp;orig,
577                                           <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A>&nbsp;conf)</PRE>
578<DL>
579<DD>Make a copy of a writable object using serialization to a buffer.
580<P>
581<DD><DL>
582<DT><B>Parameters:</B><DD><CODE>orig</CODE> - The object to copy
583<DT><B>Returns:</B><DD>The copied object</DL>
584</DD>
585</DL>
586<HR>
587
588<A NAME="cloneInto(org.apache.hadoop.io.Writable, org.apache.hadoop.io.Writable)"><!-- --></A><H3>
589cloneInto</H3>
590<PRE>
591<FONT SIZE="-1"><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</A>
592</FONT>public static void <B>cloneInto</B>(<A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&nbsp;dst,
593                                        <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>&nbsp;src)
594                      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>
595<DL>
596<DD><B>Deprecated.</B>&nbsp;<I>use ReflectionUtils.cloneInto instead.</I>
597<P>
598<DD>Make a copy of the writable object using serialiation to a buffer
599<P>
600<DD><DL>
601<DT><B>Parameters:</B><DD><CODE>dst</CODE> - the object to copy from<DD><CODE>src</CODE> - the object to copy into, which is destroyed
602<DT><B>Throws:</B>
603<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>
604</DD>
605</DL>
606<HR>
607
608<A NAME="writeVInt(java.io.DataOutput, int)"><!-- --></A><H3>
609writeVInt</H3>
610<PRE>
611public 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>&nbsp;stream,
612                             int&nbsp;i)
613                      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>
614<DL>
615<DD>Serializes an integer to a binary stream with zero-compressed encoding.
616 For -120 <= i <= 127, only one byte is used with the actual value.
617 For other values of i, the first byte value indicates whether the
618 integer is positive or negative, and the number of bytes that follow.
619 If the first byte value v is between -121 and -124, the following integer
620 is positive, with number of bytes that follow are -(v+120).
621 If the first byte value v is between -125 and -128, the following integer
622 is negative, with number of bytes that follow are -(v+124). Bytes are
623 stored in the high-non-zero-byte-first order.
624<P>
625<DD><DL>
626<DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary output stream<DD><CODE>i</CODE> - Integer to be serialized
627<DT><B>Throws:</B>
628<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>
629</DD>
630</DL>
631<HR>
632
633<A NAME="writeVLong(java.io.DataOutput, long)"><!-- --></A><H3>
634writeVLong</H3>
635<PRE>
636public 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>&nbsp;stream,
637                              long&nbsp;i)
638                       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>
639<DL>
640<DD>Serializes a long to a binary stream with zero-compressed encoding.
641 For -112 <= i <= 127, only one byte is used with the actual value.
642 For other values of i, the first byte value indicates whether the
643 long is positive or negative, and the number of bytes that follow.
644 If the first byte value v is between -113 and -120, the following long
645 is positive, with number of bytes that follow are -(v+112).
646 If the first byte value v is between -121 and -128, the following long
647 is negative, with number of bytes that follow are -(v+120). Bytes are
648 stored in the high-non-zero-byte-first order.
649<P>
650<DD><DL>
651<DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary output stream<DD><CODE>i</CODE> - Long to be serialized
652<DT><B>Throws:</B>
653<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>
654</DD>
655</DL>
656<HR>
657
658<A NAME="readVLong(java.io.DataInput)"><!-- --></A><H3>
659readVLong</H3>
660<PRE>
661public 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>&nbsp;stream)
662                      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>
663<DL>
664<DD>Reads a zero-compressed encoded long from input stream and returns it.
665<P>
666<DD><DL>
667<DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary input stream
668<DT><B>Returns:</B><DD>deserialized long from stream.
669<DT><B>Throws:</B>
670<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>
671</DD>
672</DL>
673<HR>
674
675<A NAME="readVInt(java.io.DataInput)"><!-- --></A><H3>
676readVInt</H3>
677<PRE>
678public 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>&nbsp;stream)
679                    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>
680<DL>
681<DD>Reads a zero-compressed encoded integer from input stream and returns it.
682<P>
683<DD><DL>
684<DT><B>Parameters:</B><DD><CODE>stream</CODE> - Binary input stream
685<DT><B>Returns:</B><DD>deserialized integer from stream.
686<DT><B>Throws:</B>
687<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>
688</DD>
689</DL>
690<HR>
691
692<A NAME="isNegativeVInt(byte)"><!-- --></A><H3>
693isNegativeVInt</H3>
694<PRE>
695public static boolean <B>isNegativeVInt</B>(byte&nbsp;value)</PRE>
696<DL>
697<DD>Given the first byte of a vint/vlong, determine the sign
698<P>
699<DD><DL>
700<DT><B>Parameters:</B><DD><CODE>value</CODE> - the first byte
701<DT><B>Returns:</B><DD>is the value negative</DL>
702</DD>
703</DL>
704<HR>
705
706<A NAME="decodeVIntSize(byte)"><!-- --></A><H3>
707decodeVIntSize</H3>
708<PRE>
709public static int <B>decodeVIntSize</B>(byte&nbsp;value)</PRE>
710<DL>
711<DD>Parse the first byte of a vint/vlong to determine the number of bytes
712<P>
713<DD><DL>
714<DT><B>Parameters:</B><DD><CODE>value</CODE> - the first byte of the vint/vlong
715<DT><B>Returns:</B><DD>the total number of bytes (1 to 9)</DL>
716</DD>
717</DL>
718<HR>
719
720<A NAME="getVIntSize(long)"><!-- --></A><H3>
721getVIntSize</H3>
722<PRE>
723public static int <B>getVIntSize</B>(long&nbsp;i)</PRE>
724<DL>
725<DD>Get the encoded length if an integer is stored in a variable-length format
726<P>
727<DD><DL>
728
729<DT><B>Returns:</B><DD>the encoded length</DL>
730</DD>
731</DL>
732<HR>
733
734<A NAME="readEnum(java.io.DataInput, java.lang.Class)"><!-- --></A><H3>
735readEnum</H3>
736<PRE>
737public static &lt;T extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;T&gt;&gt; T <B>readEnum</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>&nbsp;in,
738                                             <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;T&gt;&nbsp;enumType)
739                                  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>
740<DL>
741<DD>Read an Enum value from DataInput, Enums are read and written
742 using String values.
743<P>
744<DD><DL>
745<DT><B>Type Parameters:</B><DD><CODE>T</CODE> - Enum type<DT><B>Parameters:</B><DD><CODE>in</CODE> - DataInput to read from<DD><CODE>enumType</CODE> - Class type of Enum
746<DT><B>Returns:</B><DD>Enum represented by String read from DataInput
747<DT><B>Throws:</B>
748<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>
749</DD>
750</DL>
751<HR>
752
753<A NAME="writeEnum(java.io.DataOutput, java.lang.Enum)"><!-- --></A><H3>
754writeEnum</H3>
755<PRE>
756public static void <B>writeEnum</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>&nbsp;out,
757                             <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Enum.html?is-external=true" title="class or interface in java.lang">Enum</A>&lt;?&gt;&nbsp;enumVal)
758                      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>
759<DL>
760<DD>writes String value of enum to DataOutput.
761<P>
762<DD><DL>
763<DT><B>Parameters:</B><DD><CODE>out</CODE> - Dataoutput stream<DD><CODE>enumVal</CODE> - enum value
764<DT><B>Throws:</B>
765<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>
766</DD>
767</DL>
768<HR>
769
770<A NAME="skipFully(java.io.DataInput, int)"><!-- --></A><H3>
771skipFully</H3>
772<PRE>
773public static void <B>skipFully</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>&nbsp;in,
774                             int&nbsp;len)
775                      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>
776<DL>
777<DD>Skip <i>len</i> number of bytes in input stream<i>in</i>
778<P>
779<DD><DL>
780<DT><B>Parameters:</B><DD><CODE>in</CODE> - input stream<DD><CODE>len</CODE> - number of bytes to skip
781<DT><B>Throws:</B>
782<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> - when skipped less number of bytes</DL>
783</DD>
784</DL>
785<HR>
786
787<A NAME="toByteArray(org.apache.hadoop.io.Writable...)"><!-- --></A><H3>
788toByteArray</H3>
789<PRE>
790public static byte[] <B>toByteArray</B>(<A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>...&nbsp;writables)</PRE>
791<DL>
792<DD>Convert writables to a byte array
793<P>
794<DD><DL>
795</DL>
796</DD>
797</DL>
798<!-- ========= END OF CLASS DATA ========= -->
799<HR>
800
801
802<!-- ======= START OF BOTTOM NAVBAR ====== -->
803<A NAME="navbar_bottom"><!-- --></A>
804<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
805<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
806<TR>
807<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
808<A NAME="navbar_bottom_firstrow"><!-- --></A>
809<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
810  <TR ALIGN="center" VALIGN="top">
811  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
812  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
813  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
814  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/WritableUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
815  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
816  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
817  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
818  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
819  </TR>
820</TABLE>
821</TD>
822<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
823</EM>
824</TD>
825</TR>
826
827<TR>
828<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
829&nbsp;<A HREF="../../../../org/apache/hadoop/io/WritableName.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A>&nbsp;
830&nbsp;NEXT CLASS</FONT></TD>
831<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
832  <A HREF="../../../../index.html?org/apache/hadoop/io/WritableUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;
833&nbsp;<A HREF="WritableUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
834&nbsp;<SCRIPT type="text/javascript">
835  <!--
836  if(window==top) {
837    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
838  }
839  //-->
840</SCRIPT>
841<NOSCRIPT>
842  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
843</NOSCRIPT>
844
845
846</FONT></TD>
847</TR>
848<TR>
849<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
850  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
851<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
852DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
853</TR>
854</TABLE>
855<A NAME="skip-navbar_bottom"></A>
856<!-- ======== END OF BOTTOM NAVBAR ======= -->
857
858<HR>
859Copyright &copy; 2009 The Apache Software Foundation
860</BODY>
861</HTML>
Note: See TracBrowser for help on using the repository browser.