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> |
---|
7 | WritableUtils (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="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> </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/WritableUtils.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/io/WritableName.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
59 | 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> |
---|
62 | <A HREF="WritableUtils.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 | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.io</FONT> |
---|
92 | <BR> |
---|
93 | Class 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 | </TD> |
---|
121 | </TR> |
---|
122 | </TABLE> |
---|
123 | |
---|
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><T extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>> |
---|
139 | <BR> |
---|
140 | T</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 orig, |
---|
145 | <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A> conf)</CODE> |
---|
146 | |
---|
147 | <BR> |
---|
148 | 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 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> dst, |
---|
154 | <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A> src)</CODE> |
---|
155 | |
---|
156 | <BR> |
---|
157 | <B>Deprecated.</B> <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 int</CODE></FONT></TD> |
---|
162 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#decodeVIntSize(byte)">decodeVIntSize</A></B>(byte value)</CODE> |
---|
163 | |
---|
164 | <BR> |
---|
165 | 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 void</CODE></FONT></TD> |
---|
170 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#displayByteArray(byte[])">displayByteArray</A></B>(byte[] record)</CODE> |
---|
171 | |
---|
172 | <BR> |
---|
173 | </TD> |
---|
174 | </TR> |
---|
175 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
176 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
177 | <CODE>static int</CODE></FONT></TD> |
---|
178 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#getVIntSize(long)">getVIntSize</A></B>(long i)</CODE> |
---|
179 | |
---|
180 | <BR> |
---|
181 | 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 boolean</CODE></FONT></TD> |
---|
186 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/io/WritableUtils.html#isNegativeVInt(byte)">isNegativeVInt</A></B>(byte value)</CODE> |
---|
187 | |
---|
188 | <BR> |
---|
189 | 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 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> in)</CODE> |
---|
195 | |
---|
196 | <BR> |
---|
197 | </TD> |
---|
198 | </TR> |
---|
199 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
200 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
201 | <CODE>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></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> in)</CODE> |
---|
203 | |
---|
204 | <BR> |
---|
205 | </TD> |
---|
206 | </TR> |
---|
207 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
208 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
209 | <CODE>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>[]</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> in)</CODE> |
---|
211 | |
---|
212 | <BR> |
---|
213 | </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><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><T>> |
---|
222 | <BR> |
---|
223 | T</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> 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><T> enumType)</CODE> |
---|
229 | |
---|
230 | <BR> |
---|
231 | 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 <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> in)</CODE> |
---|
238 | |
---|
239 | <BR> |
---|
240 | </TD> |
---|
241 | </TR> |
---|
242 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
243 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
244 | <CODE>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>[]</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> in)</CODE> |
---|
246 | |
---|
247 | <BR> |
---|
248 | </TD> |
---|
249 | </TR> |
---|
250 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
251 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
252 | <CODE>static 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> stream)</CODE> |
---|
254 | |
---|
255 | <BR> |
---|
256 | 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 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> stream)</CODE> |
---|
262 | |
---|
263 | <BR> |
---|
264 | 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 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> in)</CODE> |
---|
270 | |
---|
271 | <BR> |
---|
272 | </TD> |
---|
273 | </TR> |
---|
274 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
275 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
276 | <CODE>static 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> in, |
---|
278 | int len)</CODE> |
---|
279 | |
---|
280 | <BR> |
---|
281 | 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 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>... writables)</CODE> |
---|
287 | |
---|
288 | <BR> |
---|
289 | 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 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> out, |
---|
295 | byte[] bytes)</CODE> |
---|
296 | |
---|
297 | <BR> |
---|
298 | </TD> |
---|
299 | </TR> |
---|
300 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
301 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
302 | <CODE>static 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> 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> s)</CODE> |
---|
305 | |
---|
306 | <BR> |
---|
307 | </TD> |
---|
308 | </TR> |
---|
309 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
310 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
311 | <CODE>static 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> 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>[] s)</CODE> |
---|
314 | |
---|
315 | <BR> |
---|
316 | </TD> |
---|
317 | </TR> |
---|
318 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
319 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
320 | <CODE>static 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> 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><?> enumVal)</CODE> |
---|
323 | |
---|
324 | <BR> |
---|
325 | 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 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> 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> s)</CODE> |
---|
332 | |
---|
333 | <BR> |
---|
334 | </TD> |
---|
335 | </TR> |
---|
336 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
337 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
338 | <CODE>static 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> 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>[] s)</CODE> |
---|
341 | |
---|
342 | <BR> |
---|
343 | </TD> |
---|
344 | </TR> |
---|
345 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
346 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
347 | <CODE>static 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> stream, |
---|
349 | int i)</CODE> |
---|
350 | |
---|
351 | <BR> |
---|
352 | 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 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> stream, |
---|
358 | long i)</CODE> |
---|
359 | |
---|
360 | <BR> |
---|
361 | Serializes a long to a binary stream with zero-compressed encoding.</TD> |
---|
362 | </TR> |
---|
363 | </TABLE> |
---|
364 | <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 | |
---|
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> |
---|
387 | WritableUtils</H3> |
---|
388 | <PRE> |
---|
389 | public <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> |
---|
404 | readCompressedByteArray</H3> |
---|
405 | <PRE> |
---|
406 | public 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> 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> |
---|
418 | skipCompressedByteArray</H3> |
---|
419 | <PRE> |
---|
420 | public 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> 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> |
---|
432 | writeCompressedByteArray</H3> |
---|
433 | <PRE> |
---|
434 | public 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> out, |
---|
435 | byte[] 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> |
---|
447 | readCompressedString</H3> |
---|
448 | <PRE> |
---|
449 | public 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> 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> |
---|
461 | writeCompressedString</H3> |
---|
462 | <PRE> |
---|
463 | public 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> 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> 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> |
---|
476 | writeString</H3> |
---|
477 | <PRE> |
---|
478 | public 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> 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> 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> |
---|
491 | readString</H3> |
---|
492 | <PRE> |
---|
493 | public 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> 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> |
---|
505 | writeStringArray</H3> |
---|
506 | <PRE> |
---|
507 | public 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> 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>[] 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> |
---|
520 | writeCompressedStringArray</H3> |
---|
521 | <PRE> |
---|
522 | public 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> 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>[] 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> |
---|
535 | readStringArray</H3> |
---|
536 | <PRE> |
---|
537 | public 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> 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> |
---|
549 | readCompressedStringArray</H3> |
---|
550 | <PRE> |
---|
551 | public 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> 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> |
---|
563 | displayByteArray</H3> |
---|
564 | <PRE> |
---|
565 | public static void <B>displayByteArray</B>(byte[] 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> |
---|
574 | clone</H3> |
---|
575 | <PRE> |
---|
576 | public static <T extends <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>> T <B>clone</B>(T orig, |
---|
577 | <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</A> 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> |
---|
589 | cloneInto</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> dst, |
---|
593 | <A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A> 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> <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> |
---|
609 | writeVInt</H3> |
---|
610 | <PRE> |
---|
611 | 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, |
---|
612 | int 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> |
---|
634 | writeVLong</H3> |
---|
635 | <PRE> |
---|
636 | 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, |
---|
637 | long 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> |
---|
659 | readVLong</H3> |
---|
660 | <PRE> |
---|
661 | 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> 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> |
---|
676 | readVInt</H3> |
---|
677 | <PRE> |
---|
678 | 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> 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> |
---|
693 | isNegativeVInt</H3> |
---|
694 | <PRE> |
---|
695 | public static boolean <B>isNegativeVInt</B>(byte 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> |
---|
707 | decodeVIntSize</H3> |
---|
708 | <PRE> |
---|
709 | public static int <B>decodeVIntSize</B>(byte 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> |
---|
721 | getVIntSize</H3> |
---|
722 | <PRE> |
---|
723 | public static int <B>getVIntSize</B>(long 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> |
---|
735 | readEnum</H3> |
---|
736 | <PRE> |
---|
737 | public static <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><T>> 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> 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><T> 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> |
---|
754 | writeEnum</H3> |
---|
755 | <PRE> |
---|
756 | public 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> 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><?> 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> |
---|
771 | skipFully</H3> |
---|
772 | <PRE> |
---|
773 | public 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> in, |
---|
774 | int 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> |
---|
788 | toByteArray</H3> |
---|
789 | <PRE> |
---|
790 | public static byte[] <B>toByteArray</B>(<A HREF="../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A>... 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> </TD> |
---|
812 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
813 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
814 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WritableUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
815 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
816 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
817 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
818 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../org/apache/hadoop/io/WritableName.html" title="class in org.apache.hadoop.io"><B>PREV CLASS</B></A> |
---|
830 | 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> |
---|
833 | <A HREF="WritableUtils.html" target="_top"><B>NO FRAMES</B></A> |
---|
834 | <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
851 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
852 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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> |
---|
859 | Copyright © 2009 The Apache Software Foundation |
---|
860 | </BODY> |
---|
861 | </HTML> |
---|