source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html@ 14627

Last change on this file since 14627 was 14627, checked in by oranfry, 17 years ago

initial import of the gs3-release-maker

File size: 15.5 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.4.2_13) on Mon Oct 01 14:33:34 NZST 2007 -->
6<TITLE>
7DigestAlgorithm (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.types.selectors.modifiedselector.DigestAlgorithm class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="DigestAlgorithm (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;PREV CLASS&nbsp;
53&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.html" title="class in org.apache.tools.ant.types.selectors.modifiedselector"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="DigestAlgorithm.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant.types.selectors.modifiedselector</FONT>
85<BR>
86Class DigestAlgorithm</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.types.selectors.modifiedselector.DigestAlgorithm</B>
90</PRE>
91<DL>
92<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html" title="interface in org.apache.tools.ant.types.selectors.modifiedselector">Algorithm</A></DD>
93</DL>
94<HR>
95<DL>
96<DT>public class <B>DigestAlgorithm</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html" title="interface in org.apache.tools.ant.types.selectors.modifiedselector">Algorithm</A></DL>
97
98<P>
99Computes a 'hashvalue' for the content of file using
100 java.security.MessageDigest.
101 Use of this algorithm doesn't require any additional nested <param>s.
102 Supported <param>s are:
103 <table>
104 <tr>
105 <th>name</th><th>values</th><th>description</th><th>required</th>
106 </tr>
107 <tr>
108 <td> algorithm.algorithm </td>
109 <td> MD5 | SHA (default provider) </td>
110 <td> name of the algorithm the provider should use </td>
111 <td> no, defaults to MD5 </td>
112 </tr>
113 <tr>
114 <td> algorithm.provider </td>
115 <td> </td>
116 <td> name of the provider to use </td>
117 <td> no, defaults to <i>null</i> </td>
118 </tr>
119 </table>
120<P>
121
122<P>
123<DL>
124<DT><B>Since:</B></DT>
125 <DD>Ant 1.6</DD>
126<DT><B>Version:</B></DT>
127 <DD>2003-09-13</DD>
128</DL>
129<HR>
130
131<P>
132<!-- ======== NESTED CLASS SUMMARY ======== -->
133
134
135<!-- =========== FIELD SUMMARY =========== -->
136
137
138<!-- ======== CONSTRUCTOR SUMMARY ======== -->
139
140<A NAME="constructor_summary"><!-- --></A>
141<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
142<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
143<TD COLSPAN=2><FONT SIZE="+2">
144<B>Constructor Summary</B></FONT></TD>
145</TR>
146<TR BGCOLOR="white" CLASS="TableRowColor">
147<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#DigestAlgorithm()">DigestAlgorithm</A></B>()</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
151</TR>
152</TABLE>
153&nbsp;
154<!-- ========== METHOD SUMMARY =========== -->
155
156<A NAME="method_summary"><!-- --></A>
157<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
158<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
159<TD COLSPAN=2><FONT SIZE="+2">
160<B>Method Summary</B></FONT></TD>
161</TR>
162<TR BGCOLOR="white" CLASS="TableRowColor">
163<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
164<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
165<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#getValue(java.io.File)">getValue</A></B>(java.io.File&nbsp;file)</CODE>
166
167<BR>
168&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Computes a value for a file content with the specified digest algorithm.</TD>
169</TR>
170<TR BGCOLOR="white" CLASS="TableRowColor">
171<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
172<CODE>&nbsp;void</CODE></FONT></TD>
173<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#initMessageDigest()">initMessageDigest</A></B>()</CODE>
174
175<BR>
176&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the security message digest.</TD>
177</TR>
178<TR BGCOLOR="white" CLASS="TableRowColor">
179<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
180<CODE>&nbsp;boolean</CODE></FONT></TD>
181<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#isValid()">isValid</A></B>()</CODE>
182
183<BR>
184&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This algorithm doesn't need any configuration.</TD>
185</TR>
186<TR BGCOLOR="white" CLASS="TableRowColor">
187<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
188<CODE>&nbsp;void</CODE></FONT></TD>
189<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#setAlgorithm(java.lang.String)">setAlgorithm</A></B>(java.lang.String&nbsp;algorithm)</CODE>
190
191<BR>
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the algorithm to be used to compute the checksum.</TD>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196<CODE>&nbsp;void</CODE></FONT></TD>
197<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#setProvider(java.lang.String)">setProvider</A></B>(java.lang.String&nbsp;provider)</CODE>
198
199<BR>
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the MessageDigest algorithm provider to be used
201 to calculate the checksum.</TD>
202</TR>
203<TR BGCOLOR="white" CLASS="TableRowColor">
204<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
205<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
206<TD><CODE><B><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/DigestAlgorithm.html#toString()">toString</A></B>()</CODE>
207
208<BR>
209&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override Object.toString().</TD>
210</TR>
211</TABLE>
212&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
213<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
214<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
215<TD><B>Methods inherited from class java.lang.Object</B></TD>
216</TR>
217<TR BGCOLOR="white" CLASS="TableRowColor">
218<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
219</TR>
220</TABLE>
221&nbsp;
222<P>
223
224<!-- ============ FIELD DETAIL =========== -->
225
226
227<!-- ========= CONSTRUCTOR DETAIL ======== -->
228
229<A NAME="constructor_detail"><!-- --></A>
230<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
231<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
232<TD COLSPAN=1><FONT SIZE="+2">
233<B>Constructor Detail</B></FONT></TD>
234</TR>
235</TABLE>
236
237<A NAME="DigestAlgorithm()"><!-- --></A><H3>
238DigestAlgorithm</H3>
239<PRE>
240public <B>DigestAlgorithm</B>()</PRE>
241<DL>
242</DL>
243
244<!-- ============ METHOD DETAIL ========== -->
245
246<A NAME="method_detail"><!-- --></A>
247<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
248<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
249<TD COLSPAN=1><FONT SIZE="+2">
250<B>Method Detail</B></FONT></TD>
251</TR>
252</TABLE>
253
254<A NAME="setAlgorithm(java.lang.String)"><!-- --></A><H3>
255setAlgorithm</H3>
256<PRE>
257public void <B>setAlgorithm</B>(java.lang.String&nbsp;algorithm)</PRE>
258<DL>
259<DD>Specifies the algorithm to be used to compute the checksum.
260 Defaults to "MD5". Other popular algorithms like "SHA" may be used as well.
261<P>
262<DD><DL>
263</DL>
264</DD>
265<DD><DL>
266<DT><B>Parameters:</B><DD><CODE>algorithm</CODE> - the digest algorithm to use</DL>
267</DD>
268</DL>
269<HR>
270
271<A NAME="setProvider(java.lang.String)"><!-- --></A><H3>
272setProvider</H3>
273<PRE>
274public void <B>setProvider</B>(java.lang.String&nbsp;provider)</PRE>
275<DL>
276<DD>Sets the MessageDigest algorithm provider to be used
277 to calculate the checksum.
278<P>
279<DD><DL>
280</DL>
281</DD>
282<DD><DL>
283<DT><B>Parameters:</B><DD><CODE>provider</CODE> - provider to use</DL>
284</DD>
285</DL>
286<HR>
287
288<A NAME="initMessageDigest()"><!-- --></A><H3>
289initMessageDigest</H3>
290<PRE>
291public void <B>initMessageDigest</B>()</PRE>
292<DL>
293<DD>Initialize the security message digest.
294<P>
295<DD><DL>
296</DL>
297</DD>
298<DD><DL>
299</DL>
300</DD>
301</DL>
302<HR>
303
304<A NAME="isValid()"><!-- --></A><H3>
305isValid</H3>
306<PRE>
307public boolean <B>isValid</B>()</PRE>
308<DL>
309<DD>This algorithm doesn't need any configuration.
310 Therefore it's always valid.
311<P>
312<DD><DL>
313<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html#isValid()">isValid</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html" title="interface in org.apache.tools.ant.types.selectors.modifiedselector">Algorithm</A></CODE></DL>
314</DD>
315<DD><DL>
316
317<DT><B>Returns:</B><DD><i>true</i> if all is ok, otherwise <i>false</i>.</DL>
318</DD>
319</DL>
320<HR>
321
322<A NAME="getValue(java.io.File)"><!-- --></A><H3>
323getValue</H3>
324<PRE>
325public java.lang.String <B>getValue</B>(java.io.File&nbsp;file)</PRE>
326<DL>
327<DD>Computes a value for a file content with the specified digest algorithm.
328<P>
329<DD><DL>
330<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html#getValue(java.io.File)">getValue</A></CODE> in interface <CODE><A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/Algorithm.html" title="interface in org.apache.tools.ant.types.selectors.modifiedselector">Algorithm</A></CODE></DL>
331</DD>
332<DD><DL>
333<DT><B>Parameters:</B><DD><CODE>file</CODE> - File object for which the value should be evaluated.
334<DT><B>Returns:</B><DD>The value for that file</DL>
335</DD>
336</DL>
337<HR>
338
339<A NAME="toString()"><!-- --></A><H3>
340toString</H3>
341<PRE>
342public java.lang.String <B>toString</B>()</PRE>
343<DL>
344<DD>Override Object.toString().
345<P>
346<DD><DL>
347</DL>
348</DD>
349<DD><DL>
350
351<DT><B>Returns:</B><DD>some information about this algorithm.</DL>
352</DD>
353</DL>
354<!-- ========= END OF CLASS DATA ========= -->
355<HR>
356
357
358<!-- ======= START OF BOTTOM NAVBAR ====== -->
359<A NAME="navbar_bottom"><!-- --></A>
360<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
361<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
362<TR>
363<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
364<A NAME="navbar_bottom_firstrow"><!-- --></A>
365<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
366 <TR ALIGN="center" VALIGN="top">
367 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
368 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
369 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
370 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
371 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
372 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
373 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
374 </TR>
375</TABLE>
376</TD>
377<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
378</EM>
379</TD>
380</TR>
381
382<TR>
383<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
384&nbsp;PREV CLASS&nbsp;
385&nbsp;<A HREF="../../../../../../../org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.html" title="class in org.apache.tools.ant.types.selectors.modifiedselector"><B>NEXT CLASS</B></A></FONT></TD>
386<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
387 <A HREF="../../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
388&nbsp;<A HREF="DigestAlgorithm.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
389&nbsp;<SCRIPT type="text/javascript">
390 <!--
391 if(window==top) {
392 document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
393 }
394 //-->
395</SCRIPT>
396<NOSCRIPT>
397 <A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
398</NOSCRIPT>
399
400</FONT></TD>
401</TR>
402<TR>
403<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
404 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
405<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
406DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
407</TR>
408</TABLE>
409<A NAME="skip-navbar_bottom"></A>
410<!-- ======== END OF BOTTOM NAVBAR ======= -->
411
412<HR>
413Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
414</BODY>
415</HTML>
Note: See TracBrowser for help on using the repository browser.