1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
2 | <!--NewPage--> |
---|
3 | <HTML> |
---|
4 | <HEAD> |
---|
5 | <!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:55 UTC 2009 --> |
---|
6 | <TITLE> |
---|
7 | DataChecksum (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="DataChecksum (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/DataChecksum.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/util/Daemon.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A> |
---|
59 | <A HREF="../../../../org/apache/hadoop/util/DiskChecker.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD> |
---|
60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
61 | <A HREF="../../../../index.html?org/apache/hadoop/util/DataChecksum.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="DataChecksum.html" target="_top"><B>NO FRAMES</B></A> |
---|
63 | <SCRIPT type="text/javascript"> |
---|
64 | <!-- |
---|
65 | if(window==top) { |
---|
66 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
67 | } |
---|
68 | //--> |
---|
69 | </SCRIPT> |
---|
70 | <NOSCRIPT> |
---|
71 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
72 | </NOSCRIPT> |
---|
73 | |
---|
74 | |
---|
75 | </FONT></TD> |
---|
76 | </TR> |
---|
77 | <TR> |
---|
78 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
79 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
82 | </TR> |
---|
83 | </TABLE> |
---|
84 | <A NAME="skip-navbar_top"></A> |
---|
85 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
86 | |
---|
87 | <HR> |
---|
88 | <!-- ======== START OF CLASS DATA ======== --> |
---|
89 | <H2> |
---|
90 | <FONT SIZE="-1"> |
---|
91 | org.apache.hadoop.util</FONT> |
---|
92 | <BR> |
---|
93 | Class DataChecksum</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.util.DataChecksum</B> |
---|
97 | </PRE> |
---|
98 | <DL> |
---|
99 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></DD> |
---|
100 | </DL> |
---|
101 | <HR> |
---|
102 | <DL> |
---|
103 | <DT><PRE>public class <B>DataChecksum</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><DT>implements <A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></DL> |
---|
104 | </PRE> |
---|
105 | |
---|
106 | <P> |
---|
107 | This class provides inteface and utilities for processing checksums for |
---|
108 | DFS data transfers. |
---|
109 | <P> |
---|
110 | |
---|
111 | <P> |
---|
112 | <HR> |
---|
113 | |
---|
114 | <P> |
---|
115 | <!-- =========== FIELD SUMMARY =========== --> |
---|
116 | |
---|
117 | <A NAME="field_summary"><!-- --></A> |
---|
118 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
119 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
120 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
121 | <B>Field Summary</B></FONT></TH> |
---|
122 | </TR> |
---|
123 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
124 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
125 | <CODE>static int</CODE></FONT></TD> |
---|
126 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#CHECKSUM_CRC32">CHECKSUM_CRC32</A></B></CODE> |
---|
127 | |
---|
128 | <BR> |
---|
129 | </TD> |
---|
130 | </TR> |
---|
131 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
132 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
133 | <CODE>static int</CODE></FONT></TD> |
---|
134 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#CHECKSUM_NULL">CHECKSUM_NULL</A></B></CODE> |
---|
135 | |
---|
136 | <BR> |
---|
137 | </TD> |
---|
138 | </TR> |
---|
139 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
140 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
141 | <CODE>static int</CODE></FONT></TD> |
---|
142 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#HEADER_LEN">HEADER_LEN</A></B></CODE> |
---|
143 | |
---|
144 | <BR> |
---|
145 | </TD> |
---|
146 | </TR> |
---|
147 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
148 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
149 | <CODE>static int</CODE></FONT></TD> |
---|
150 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#SIZE_OF_INTEGER">SIZE_OF_INTEGER</A></B></CODE> |
---|
151 | |
---|
152 | <BR> |
---|
153 | </TD> |
---|
154 | </TR> |
---|
155 | </TABLE> |
---|
156 | |
---|
157 | <!-- ========== METHOD SUMMARY =========== --> |
---|
158 | |
---|
159 | <A NAME="method_summary"><!-- --></A> |
---|
160 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
161 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
162 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
163 | <B>Method Summary</B></FONT></TH> |
---|
164 | </TR> |
---|
165 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
166 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
167 | <CODE> boolean</CODE></FONT></TD> |
---|
168 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#compare(byte[], int)">compare</A></B>(byte[] buf, |
---|
169 | int offset)</CODE> |
---|
170 | |
---|
171 | <BR> |
---|
172 | Compares the checksum located at buf[offset] with the current checksum.</TD> |
---|
173 | </TR> |
---|
174 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
175 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
176 | <CODE> int</CODE></FONT></TD> |
---|
177 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getBytesPerChecksum()">getBytesPerChecksum</A></B>()</CODE> |
---|
178 | |
---|
179 | <BR> |
---|
180 | </TD> |
---|
181 | </TR> |
---|
182 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
183 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
184 | <CODE>static int</CODE></FONT></TD> |
---|
185 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getChecksumHeaderSize()">getChecksumHeaderSize</A></B>()</CODE> |
---|
186 | |
---|
187 | <BR> |
---|
188 | </TD> |
---|
189 | </TR> |
---|
190 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
191 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
192 | <CODE> int</CODE></FONT></TD> |
---|
193 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getChecksumSize()">getChecksumSize</A></B>()</CODE> |
---|
194 | |
---|
195 | <BR> |
---|
196 | </TD> |
---|
197 | </TR> |
---|
198 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
199 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
200 | <CODE> int</CODE></FONT></TD> |
---|
201 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getChecksumType()">getChecksumType</A></B>()</CODE> |
---|
202 | |
---|
203 | <BR> |
---|
204 | </TD> |
---|
205 | </TR> |
---|
206 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
207 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
208 | <CODE> byte[]</CODE></FONT></TD> |
---|
209 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getHeader()">getHeader</A></B>()</CODE> |
---|
210 | |
---|
211 | <BR> |
---|
212 | </TD> |
---|
213 | </TR> |
---|
214 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
215 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
216 | <CODE> int</CODE></FONT></TD> |
---|
217 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getNumBytesInSum()">getNumBytesInSum</A></B>()</CODE> |
---|
218 | |
---|
219 | <BR> |
---|
220 | </TD> |
---|
221 | </TR> |
---|
222 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
223 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
224 | <CODE> long</CODE></FONT></TD> |
---|
225 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#getValue()">getValue</A></B>()</CODE> |
---|
226 | |
---|
227 | <BR> |
---|
228 | </TD> |
---|
229 | </TR> |
---|
230 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
231 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
232 | <CODE>static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A></CODE></FONT></TD> |
---|
233 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#newDataChecksum(byte[], int)">newDataChecksum</A></B>(byte[] bytes, |
---|
234 | int offset)</CODE> |
---|
235 | |
---|
236 | <BR> |
---|
237 | Creates a DataChecksum from HEADER_LEN bytes from arr[offset].</TD> |
---|
238 | </TR> |
---|
239 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
240 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
241 | <CODE>static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A></CODE></FONT></TD> |
---|
242 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#newDataChecksum(java.io.DataInputStream)">newDataChecksum</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInputStream.html?is-external=true" title="class or interface in java.io">DataInputStream</A> in)</CODE> |
---|
243 | |
---|
244 | <BR> |
---|
245 | This constructucts a DataChecksum by reading HEADER_LEN bytes from |
---|
246 | input stream <i>in</i></TD> |
---|
247 | </TR> |
---|
248 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
249 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
250 | <CODE>static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A></CODE></FONT></TD> |
---|
251 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#newDataChecksum(int, int)">newDataChecksum</A></B>(int type, |
---|
252 | int bytesPerChecksum)</CODE> |
---|
253 | |
---|
254 | <BR> |
---|
255 | </TD> |
---|
256 | </TR> |
---|
257 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
258 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
259 | <CODE> void</CODE></FONT></TD> |
---|
260 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#reset()">reset</A></B>()</CODE> |
---|
261 | |
---|
262 | <BR> |
---|
263 | </TD> |
---|
264 | </TR> |
---|
265 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
266 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
267 | <CODE> void</CODE></FONT></TD> |
---|
268 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#update(byte[], int, int)">update</A></B>(byte[] b, |
---|
269 | int off, |
---|
270 | int len)</CODE> |
---|
271 | |
---|
272 | <BR> |
---|
273 | </TD> |
---|
274 | </TR> |
---|
275 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
276 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
277 | <CODE> void</CODE></FONT></TD> |
---|
278 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#update(int)">update</A></B>(int b)</CODE> |
---|
279 | |
---|
280 | <BR> |
---|
281 | </TD> |
---|
282 | </TR> |
---|
283 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
284 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
285 | <CODE> void</CODE></FONT></TD> |
---|
286 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#writeHeader(java.io.DataOutputStream)">writeHeader</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A> out)</CODE> |
---|
287 | |
---|
288 | <BR> |
---|
289 | Writes the checksum header to the output stream <i>out</i>.</TD> |
---|
290 | </TR> |
---|
291 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
292 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
293 | <CODE> int</CODE></FONT></TD> |
---|
294 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#writeValue(byte[], int, boolean)">writeValue</A></B>(byte[] buf, |
---|
295 | int offset, |
---|
296 | boolean reset)</CODE> |
---|
297 | |
---|
298 | <BR> |
---|
299 | Writes the current checksum to a buffer.</TD> |
---|
300 | </TR> |
---|
301 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
302 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
303 | <CODE> int</CODE></FONT></TD> |
---|
304 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/util/DataChecksum.html#writeValue(java.io.DataOutputStream, boolean)">writeValue</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A> out, |
---|
305 | boolean reset)</CODE> |
---|
306 | |
---|
307 | <BR> |
---|
308 | Writes the current checksum to the stream.</TD> |
---|
309 | </TR> |
---|
310 | </TABLE> |
---|
311 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
312 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
313 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
314 | <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> |
---|
315 | </TR> |
---|
316 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
317 | <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> |
---|
318 | </TR> |
---|
319 | </TABLE> |
---|
320 | |
---|
321 | <P> |
---|
322 | |
---|
323 | <!-- ============ FIELD DETAIL =========== --> |
---|
324 | |
---|
325 | <A NAME="field_detail"><!-- --></A> |
---|
326 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
327 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
328 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
329 | <B>Field Detail</B></FONT></TH> |
---|
330 | </TR> |
---|
331 | </TABLE> |
---|
332 | |
---|
333 | <A NAME="HEADER_LEN"><!-- --></A><H3> |
---|
334 | HEADER_LEN</H3> |
---|
335 | <PRE> |
---|
336 | public static final int <B>HEADER_LEN</B></PRE> |
---|
337 | <DL> |
---|
338 | <DL> |
---|
339 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.util.DataChecksum.HEADER_LEN">Constant Field Values</A></DL> |
---|
340 | </DL> |
---|
341 | <HR> |
---|
342 | |
---|
343 | <A NAME="CHECKSUM_NULL"><!-- --></A><H3> |
---|
344 | CHECKSUM_NULL</H3> |
---|
345 | <PRE> |
---|
346 | public static final int <B>CHECKSUM_NULL</B></PRE> |
---|
347 | <DL> |
---|
348 | <DL> |
---|
349 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.util.DataChecksum.CHECKSUM_NULL">Constant Field Values</A></DL> |
---|
350 | </DL> |
---|
351 | <HR> |
---|
352 | |
---|
353 | <A NAME="CHECKSUM_CRC32"><!-- --></A><H3> |
---|
354 | CHECKSUM_CRC32</H3> |
---|
355 | <PRE> |
---|
356 | public static final int <B>CHECKSUM_CRC32</B></PRE> |
---|
357 | <DL> |
---|
358 | <DL> |
---|
359 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.util.DataChecksum.CHECKSUM_CRC32">Constant Field Values</A></DL> |
---|
360 | </DL> |
---|
361 | <HR> |
---|
362 | |
---|
363 | <A NAME="SIZE_OF_INTEGER"><!-- --></A><H3> |
---|
364 | SIZE_OF_INTEGER</H3> |
---|
365 | <PRE> |
---|
366 | public static final int <B>SIZE_OF_INTEGER</B></PRE> |
---|
367 | <DL> |
---|
368 | <DL> |
---|
369 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.hadoop.util.DataChecksum.SIZE_OF_INTEGER">Constant Field Values</A></DL> |
---|
370 | </DL> |
---|
371 | |
---|
372 | <!-- ============ METHOD DETAIL ========== --> |
---|
373 | |
---|
374 | <A NAME="method_detail"><!-- --></A> |
---|
375 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
376 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
377 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
378 | <B>Method Detail</B></FONT></TH> |
---|
379 | </TR> |
---|
380 | </TABLE> |
---|
381 | |
---|
382 | <A NAME="newDataChecksum(int, int)"><!-- --></A><H3> |
---|
383 | newDataChecksum</H3> |
---|
384 | <PRE> |
---|
385 | public static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A> <B>newDataChecksum</B>(int type, |
---|
386 | int bytesPerChecksum)</PRE> |
---|
387 | <DL> |
---|
388 | <DD><DL> |
---|
389 | </DL> |
---|
390 | </DD> |
---|
391 | <DD><DL> |
---|
392 | </DL> |
---|
393 | </DD> |
---|
394 | </DL> |
---|
395 | <HR> |
---|
396 | |
---|
397 | <A NAME="newDataChecksum(byte[], int)"><!-- --></A><H3> |
---|
398 | newDataChecksum</H3> |
---|
399 | <PRE> |
---|
400 | public static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A> <B>newDataChecksum</B>(byte[] bytes, |
---|
401 | int offset)</PRE> |
---|
402 | <DL> |
---|
403 | <DD>Creates a DataChecksum from HEADER_LEN bytes from arr[offset]. |
---|
404 | <P> |
---|
405 | <DD><DL> |
---|
406 | </DL> |
---|
407 | </DD> |
---|
408 | <DD><DL> |
---|
409 | |
---|
410 | <DT><B>Returns:</B><DD>DataChecksum of the type in the array or null in case of an error.</DL> |
---|
411 | </DD> |
---|
412 | </DL> |
---|
413 | <HR> |
---|
414 | |
---|
415 | <A NAME="newDataChecksum(java.io.DataInputStream)"><!-- --></A><H3> |
---|
416 | newDataChecksum</H3> |
---|
417 | <PRE> |
---|
418 | public static <A HREF="../../../../org/apache/hadoop/util/DataChecksum.html" title="class in org.apache.hadoop.util">DataChecksum</A> <B>newDataChecksum</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInputStream.html?is-external=true" title="class or interface in java.io">DataInputStream</A> in) |
---|
419 | 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> |
---|
420 | <DL> |
---|
421 | <DD>This constructucts a DataChecksum by reading HEADER_LEN bytes from |
---|
422 | input stream <i>in</i> |
---|
423 | <P> |
---|
424 | <DD><DL> |
---|
425 | </DL> |
---|
426 | </DD> |
---|
427 | <DD><DL> |
---|
428 | |
---|
429 | <DT><B>Throws:</B> |
---|
430 | <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> |
---|
431 | </DD> |
---|
432 | </DL> |
---|
433 | <HR> |
---|
434 | |
---|
435 | <A NAME="writeHeader(java.io.DataOutputStream)"><!-- --></A><H3> |
---|
436 | writeHeader</H3> |
---|
437 | <PRE> |
---|
438 | public void <B>writeHeader</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A> out) |
---|
439 | 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> |
---|
440 | <DL> |
---|
441 | <DD>Writes the checksum header to the output stream <i>out</i>. |
---|
442 | <P> |
---|
443 | <DD><DL> |
---|
444 | </DL> |
---|
445 | </DD> |
---|
446 | <DD><DL> |
---|
447 | |
---|
448 | <DT><B>Throws:</B> |
---|
449 | <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> |
---|
450 | </DD> |
---|
451 | </DL> |
---|
452 | <HR> |
---|
453 | |
---|
454 | <A NAME="getHeader()"><!-- --></A><H3> |
---|
455 | getHeader</H3> |
---|
456 | <PRE> |
---|
457 | public byte[] <B>getHeader</B>()</PRE> |
---|
458 | <DL> |
---|
459 | <DD><DL> |
---|
460 | </DL> |
---|
461 | </DD> |
---|
462 | <DD><DL> |
---|
463 | </DL> |
---|
464 | </DD> |
---|
465 | </DL> |
---|
466 | <HR> |
---|
467 | |
---|
468 | <A NAME="writeValue(java.io.DataOutputStream, boolean)"><!-- --></A><H3> |
---|
469 | writeValue</H3> |
---|
470 | <PRE> |
---|
471 | public int <B>writeValue</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutputStream.html?is-external=true" title="class or interface in java.io">DataOutputStream</A> out, |
---|
472 | boolean reset) |
---|
473 | 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> |
---|
474 | <DL> |
---|
475 | <DD>Writes the current checksum to the stream. |
---|
476 | If <i>reset</i> is true, then resets the checksum. |
---|
477 | <P> |
---|
478 | <DD><DL> |
---|
479 | </DL> |
---|
480 | </DD> |
---|
481 | <DD><DL> |
---|
482 | |
---|
483 | <DT><B>Returns:</B><DD>number of bytes written. Will be equal to getChecksumSize(); |
---|
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="writeValue(byte[], int, boolean)"><!-- --></A><H3> |
---|
491 | writeValue</H3> |
---|
492 | <PRE> |
---|
493 | public int <B>writeValue</B>(byte[] buf, |
---|
494 | int offset, |
---|
495 | boolean reset) |
---|
496 | 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> |
---|
497 | <DL> |
---|
498 | <DD>Writes the current checksum to a buffer. |
---|
499 | If <i>reset</i> is true, then resets the checksum. |
---|
500 | <P> |
---|
501 | <DD><DL> |
---|
502 | </DL> |
---|
503 | </DD> |
---|
504 | <DD><DL> |
---|
505 | |
---|
506 | <DT><B>Returns:</B><DD>number of bytes written. Will be equal to getChecksumSize(); |
---|
507 | <DT><B>Throws:</B> |
---|
508 | <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> |
---|
509 | </DD> |
---|
510 | </DL> |
---|
511 | <HR> |
---|
512 | |
---|
513 | <A NAME="compare(byte[], int)"><!-- --></A><H3> |
---|
514 | compare</H3> |
---|
515 | <PRE> |
---|
516 | public boolean <B>compare</B>(byte[] buf, |
---|
517 | int offset)</PRE> |
---|
518 | <DL> |
---|
519 | <DD>Compares the checksum located at buf[offset] with the current checksum. |
---|
520 | <P> |
---|
521 | <DD><DL> |
---|
522 | </DL> |
---|
523 | </DD> |
---|
524 | <DD><DL> |
---|
525 | |
---|
526 | <DT><B>Returns:</B><DD>true if the checksum matches and false otherwise.</DL> |
---|
527 | </DD> |
---|
528 | </DL> |
---|
529 | <HR> |
---|
530 | |
---|
531 | <A NAME="getChecksumType()"><!-- --></A><H3> |
---|
532 | getChecksumType</H3> |
---|
533 | <PRE> |
---|
534 | public int <B>getChecksumType</B>()</PRE> |
---|
535 | <DL> |
---|
536 | <DD><DL> |
---|
537 | </DL> |
---|
538 | </DD> |
---|
539 | <DD><DL> |
---|
540 | </DL> |
---|
541 | </DD> |
---|
542 | </DL> |
---|
543 | <HR> |
---|
544 | |
---|
545 | <A NAME="getChecksumSize()"><!-- --></A><H3> |
---|
546 | getChecksumSize</H3> |
---|
547 | <PRE> |
---|
548 | public int <B>getChecksumSize</B>()</PRE> |
---|
549 | <DL> |
---|
550 | <DD><DL> |
---|
551 | </DL> |
---|
552 | </DD> |
---|
553 | <DD><DL> |
---|
554 | </DL> |
---|
555 | </DD> |
---|
556 | </DL> |
---|
557 | <HR> |
---|
558 | |
---|
559 | <A NAME="getBytesPerChecksum()"><!-- --></A><H3> |
---|
560 | getBytesPerChecksum</H3> |
---|
561 | <PRE> |
---|
562 | public int <B>getBytesPerChecksum</B>()</PRE> |
---|
563 | <DL> |
---|
564 | <DD><DL> |
---|
565 | </DL> |
---|
566 | </DD> |
---|
567 | <DD><DL> |
---|
568 | </DL> |
---|
569 | </DD> |
---|
570 | </DL> |
---|
571 | <HR> |
---|
572 | |
---|
573 | <A NAME="getNumBytesInSum()"><!-- --></A><H3> |
---|
574 | getNumBytesInSum</H3> |
---|
575 | <PRE> |
---|
576 | public int <B>getNumBytesInSum</B>()</PRE> |
---|
577 | <DL> |
---|
578 | <DD><DL> |
---|
579 | </DL> |
---|
580 | </DD> |
---|
581 | <DD><DL> |
---|
582 | </DL> |
---|
583 | </DD> |
---|
584 | </DL> |
---|
585 | <HR> |
---|
586 | |
---|
587 | <A NAME="getChecksumHeaderSize()"><!-- --></A><H3> |
---|
588 | getChecksumHeaderSize</H3> |
---|
589 | <PRE> |
---|
590 | public static int <B>getChecksumHeaderSize</B>()</PRE> |
---|
591 | <DL> |
---|
592 | <DD><DL> |
---|
593 | </DL> |
---|
594 | </DD> |
---|
595 | <DD><DL> |
---|
596 | </DL> |
---|
597 | </DD> |
---|
598 | </DL> |
---|
599 | <HR> |
---|
600 | |
---|
601 | <A NAME="getValue()"><!-- --></A><H3> |
---|
602 | getValue</H3> |
---|
603 | <PRE> |
---|
604 | public long <B>getValue</B>()</PRE> |
---|
605 | <DL> |
---|
606 | <DD><DL> |
---|
607 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true#getValue()" title="class or interface in java.util.zip">getValue</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></CODE></DL> |
---|
608 | </DD> |
---|
609 | <DD><DL> |
---|
610 | </DL> |
---|
611 | </DD> |
---|
612 | </DL> |
---|
613 | <HR> |
---|
614 | |
---|
615 | <A NAME="reset()"><!-- --></A><H3> |
---|
616 | reset</H3> |
---|
617 | <PRE> |
---|
618 | public void <B>reset</B>()</PRE> |
---|
619 | <DL> |
---|
620 | <DD><DL> |
---|
621 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true#reset()" title="class or interface in java.util.zip">reset</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></CODE></DL> |
---|
622 | </DD> |
---|
623 | <DD><DL> |
---|
624 | </DL> |
---|
625 | </DD> |
---|
626 | </DL> |
---|
627 | <HR> |
---|
628 | |
---|
629 | <A NAME="update(byte[], int, int)"><!-- --></A><H3> |
---|
630 | update</H3> |
---|
631 | <PRE> |
---|
632 | public void <B>update</B>(byte[] b, |
---|
633 | int off, |
---|
634 | int len)</PRE> |
---|
635 | <DL> |
---|
636 | <DD><DL> |
---|
637 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true#update(byte[], int, int)" title="class or interface in java.util.zip">update</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></CODE></DL> |
---|
638 | </DD> |
---|
639 | <DD><DL> |
---|
640 | </DL> |
---|
641 | </DD> |
---|
642 | </DL> |
---|
643 | <HR> |
---|
644 | |
---|
645 | <A NAME="update(int)"><!-- --></A><H3> |
---|
646 | update</H3> |
---|
647 | <PRE> |
---|
648 | public void <B>update</B>(int b)</PRE> |
---|
649 | <DL> |
---|
650 | <DD><DL> |
---|
651 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true#update(int)" title="class or interface in java.util.zip">update</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/util/zip/Checksum.html?is-external=true" title="class or interface in java.util.zip">Checksum</A></CODE></DL> |
---|
652 | </DD> |
---|
653 | <DD><DL> |
---|
654 | </DL> |
---|
655 | </DD> |
---|
656 | </DL> |
---|
657 | <!-- ========= END OF CLASS DATA ========= --> |
---|
658 | <HR> |
---|
659 | |
---|
660 | |
---|
661 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
662 | <A NAME="navbar_bottom"><!-- --></A> |
---|
663 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
664 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
665 | <TR> |
---|
666 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
667 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
668 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
669 | <TR ALIGN="center" VALIGN="top"> |
---|
670 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
671 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
672 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
673 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/DataChecksum.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
674 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
675 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
676 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
677 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
678 | </TR> |
---|
679 | </TABLE> |
---|
680 | </TD> |
---|
681 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
682 | </EM> |
---|
683 | </TD> |
---|
684 | </TR> |
---|
685 | |
---|
686 | <TR> |
---|
687 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
688 | <A HREF="../../../../org/apache/hadoop/util/Daemon.html" title="class in org.apache.hadoop.util"><B>PREV CLASS</B></A> |
---|
689 | <A HREF="../../../../org/apache/hadoop/util/DiskChecker.html" title="class in org.apache.hadoop.util"><B>NEXT CLASS</B></A></FONT></TD> |
---|
690 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
691 | <A HREF="../../../../index.html?org/apache/hadoop/util/DataChecksum.html" target="_top"><B>FRAMES</B></A> |
---|
692 | <A HREF="DataChecksum.html" target="_top"><B>NO FRAMES</B></A> |
---|
693 | <SCRIPT type="text/javascript"> |
---|
694 | <!-- |
---|
695 | if(window==top) { |
---|
696 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
697 | } |
---|
698 | //--> |
---|
699 | </SCRIPT> |
---|
700 | <NOSCRIPT> |
---|
701 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
702 | </NOSCRIPT> |
---|
703 | |
---|
704 | |
---|
705 | </FONT></TD> |
---|
706 | </TR> |
---|
707 | <TR> |
---|
708 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
709 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
710 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
711 | DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
712 | </TR> |
---|
713 | </TABLE> |
---|
714 | <A NAME="skip-navbar_bottom"></A> |
---|
715 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
716 | |
---|
717 | <HR> |
---|
718 | Copyright © 2009 The Apache Software Foundation |
---|
719 | </BODY> |
---|
720 | </HTML> |
---|