source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/tar/TarUtils.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: 16.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:35 NZST 2007 -->
6<TITLE>
7TarUtils (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.tar.TarUtils 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="TarUtils (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;<A HREF="../../../../org/apache/tools/tar/TarOutputStream.html" title="class in org.apache.tools.tar"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;NEXT CLASS</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="TarUtils.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.tar</FONT>
85<BR>
86Class TarUtils</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.tar.TarUtils</B>
90</PRE>
91<HR>
92<DL>
93<DT>public class <B>TarUtils</B><DT>extends java.lang.Object</DL>
94
95<P>
96This class provides static utility methods to work with byte streams.
97<P>
98
99<P>
100<HR>
101
102<P>
103<!-- ======== NESTED CLASS SUMMARY ======== -->
104
105
106<!-- =========== FIELD SUMMARY =========== -->
107
108
109<!-- ======== CONSTRUCTOR SUMMARY ======== -->
110
111<A NAME="constructor_summary"><!-- --></A>
112<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
113<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
114<TD COLSPAN=2><FONT SIZE="+2">
115<B>Constructor Summary</B></FONT></TD>
116</TR>
117<TR BGCOLOR="white" CLASS="TableRowColor">
118<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#TarUtils()">TarUtils</A></B>()</CODE>
119
120<BR>
121&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
122</TR>
123</TABLE>
124&nbsp;
125<!-- ========== METHOD SUMMARY =========== -->
126
127<A NAME="method_summary"><!-- --></A>
128<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
129<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
130<TD COLSPAN=2><FONT SIZE="+2">
131<B>Method Summary</B></FONT></TD>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
135<CODE>static&nbsp;long</CODE></FONT></TD>
136<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#computeCheckSum(byte[])">computeCheckSum</A></B>(byte[]&nbsp;buf)</CODE>
137
138<BR>
139&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the checksum of a tar entry header.</TD>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>static&nbsp;int</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#getCheckSumOctalBytes(long, byte[], int, int)">getCheckSumOctalBytes</A></B>(long&nbsp;value,
145 byte[]&nbsp;buf,
146 int&nbsp;offset,
147 int&nbsp;length)</CODE>
148
149<BR>
150&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the checksum octal integer from a header buffer.</TD>
151</TR>
152<TR BGCOLOR="white" CLASS="TableRowColor">
153<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
154<CODE>static&nbsp;int</CODE></FONT></TD>
155<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#getLongOctalBytes(long, byte[], int, int)">getLongOctalBytes</A></B>(long&nbsp;value,
156 byte[]&nbsp;buf,
157 int&nbsp;offset,
158 int&nbsp;length)</CODE>
159
160<BR>
161&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse an octal long integer from a header buffer.</TD>
162</TR>
163<TR BGCOLOR="white" CLASS="TableRowColor">
164<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
165<CODE>static&nbsp;int</CODE></FONT></TD>
166<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#getNameBytes(java.lang.StringBuffer, byte[], int, int)">getNameBytes</A></B>(java.lang.StringBuffer&nbsp;name,
167 byte[]&nbsp;buf,
168 int&nbsp;offset,
169 int&nbsp;length)</CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine the number of bytes in an entry name.</TD>
173</TR>
174<TR BGCOLOR="white" CLASS="TableRowColor">
175<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
176<CODE>static&nbsp;int</CODE></FONT></TD>
177<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#getOctalBytes(long, byte[], int, int)">getOctalBytes</A></B>(long&nbsp;value,
178 byte[]&nbsp;buf,
179 int&nbsp;offset,
180 int&nbsp;length)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse an octal integer from a header buffer.</TD>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>static&nbsp;java.lang.StringBuffer</CODE></FONT></TD>
188<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#parseName(byte[], int, int)">parseName</A></B>(byte[]&nbsp;header,
189 int&nbsp;offset,
190 int&nbsp;length)</CODE>
191
192<BR>
193&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse an entry name from a header buffer.</TD>
194</TR>
195<TR BGCOLOR="white" CLASS="TableRowColor">
196<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
197<CODE>static&nbsp;long</CODE></FONT></TD>
198<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarUtils.html#parseOctal(byte[], int, int)">parseOctal</A></B>(byte[]&nbsp;header,
199 int&nbsp;offset,
200 int&nbsp;length)</CODE>
201
202<BR>
203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse an octal string from a header buffer.</TD>
204</TR>
205</TABLE>
206&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
207<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
208<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
209<TD><B>Methods inherited from class java.lang.Object</B></TD>
210</TR>
211<TR BGCOLOR="white" CLASS="TableRowColor">
212<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
213</TR>
214</TABLE>
215&nbsp;
216<P>
217
218<!-- ============ FIELD DETAIL =========== -->
219
220
221<!-- ========= CONSTRUCTOR DETAIL ======== -->
222
223<A NAME="constructor_detail"><!-- --></A>
224<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
225<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
226<TD COLSPAN=1><FONT SIZE="+2">
227<B>Constructor Detail</B></FONT></TD>
228</TR>
229</TABLE>
230
231<A NAME="TarUtils()"><!-- --></A><H3>
232TarUtils</H3>
233<PRE>
234public <B>TarUtils</B>()</PRE>
235<DL>
236</DL>
237
238<!-- ============ METHOD DETAIL ========== -->
239
240<A NAME="method_detail"><!-- --></A>
241<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
242<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
243<TD COLSPAN=1><FONT SIZE="+2">
244<B>Method Detail</B></FONT></TD>
245</TR>
246</TABLE>
247
248<A NAME="parseOctal(byte[], int, int)"><!-- --></A><H3>
249parseOctal</H3>
250<PRE>
251public static long <B>parseOctal</B>(byte[]&nbsp;header,
252 int&nbsp;offset,
253 int&nbsp;length)</PRE>
254<DL>
255<DD>Parse an octal string from a header buffer. This is used for the
256 file permission mode value.
257<P>
258<DD><DL>
259<DT><B>Parameters:</B><DD><CODE>header</CODE> - The header buffer from which to parse.<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
260<DT><B>Returns:</B><DD>The long value of the octal string.</DL>
261</DD>
262</DL>
263<HR>
264
265<A NAME="parseName(byte[], int, int)"><!-- --></A><H3>
266parseName</H3>
267<PRE>
268public static java.lang.StringBuffer <B>parseName</B>(byte[]&nbsp;header,
269 int&nbsp;offset,
270 int&nbsp;length)</PRE>
271<DL>
272<DD>Parse an entry name from a header buffer.
273<P>
274<DD><DL>
275<DT><B>Parameters:</B><DD><CODE>header</CODE> - The header buffer from which to parse.<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
276<DT><B>Returns:</B><DD>The header's entry name.</DL>
277</DD>
278</DL>
279<HR>
280
281<A NAME="getNameBytes(java.lang.StringBuffer, byte[], int, int)"><!-- --></A><H3>
282getNameBytes</H3>
283<PRE>
284public static int <B>getNameBytes</B>(java.lang.StringBuffer&nbsp;name,
285 byte[]&nbsp;buf,
286 int&nbsp;offset,
287 int&nbsp;length)</PRE>
288<DL>
289<DD>Determine the number of bytes in an entry name.
290<P>
291<DD><DL>
292<DT><B>Parameters:</B><DD><CODE>name</CODE> - The header name from which to parse.<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
293<DT><B>Returns:</B><DD>The number of bytes in a header's entry name.</DL>
294</DD>
295</DL>
296<HR>
297
298<A NAME="getOctalBytes(long, byte[], int, int)"><!-- --></A><H3>
299getOctalBytes</H3>
300<PRE>
301public static int <B>getOctalBytes</B>(long&nbsp;value,
302 byte[]&nbsp;buf,
303 int&nbsp;offset,
304 int&nbsp;length)</PRE>
305<DL>
306<DD>Parse an octal integer from a header buffer.
307<P>
308<DD><DL>
309<DT><B>Parameters:</B><DD><CODE>value</CODE> - The header value<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
310<DT><B>Returns:</B><DD>The integer value of the octal bytes.</DL>
311</DD>
312</DL>
313<HR>
314
315<A NAME="getLongOctalBytes(long, byte[], int, int)"><!-- --></A><H3>
316getLongOctalBytes</H3>
317<PRE>
318public static int <B>getLongOctalBytes</B>(long&nbsp;value,
319 byte[]&nbsp;buf,
320 int&nbsp;offset,
321 int&nbsp;length)</PRE>
322<DL>
323<DD>Parse an octal long integer from a header buffer.
324<P>
325<DD><DL>
326<DT><B>Parameters:</B><DD><CODE>value</CODE> - The header value<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
327<DT><B>Returns:</B><DD>The long value of the octal bytes.</DL>
328</DD>
329</DL>
330<HR>
331
332<A NAME="getCheckSumOctalBytes(long, byte[], int, int)"><!-- --></A><H3>
333getCheckSumOctalBytes</H3>
334<PRE>
335public static int <B>getCheckSumOctalBytes</B>(long&nbsp;value,
336 byte[]&nbsp;buf,
337 int&nbsp;offset,
338 int&nbsp;length)</PRE>
339<DL>
340<DD>Parse the checksum octal integer from a header buffer.
341<P>
342<DD><DL>
343<DT><B>Parameters:</B><DD><CODE>value</CODE> - The header value<DD><CODE>offset</CODE> - The offset into the buffer from which to parse.<DD><CODE>length</CODE> - The number of header bytes to parse.
344<DT><B>Returns:</B><DD>The integer value of the entry's checksum.</DL>
345</DD>
346</DL>
347<HR>
348
349<A NAME="computeCheckSum(byte[])"><!-- --></A><H3>
350computeCheckSum</H3>
351<PRE>
352public static long <B>computeCheckSum</B>(byte[]&nbsp;buf)</PRE>
353<DL>
354<DD>Compute the checksum of a tar entry header.
355<P>
356<DD><DL>
357<DT><B>Parameters:</B><DD><CODE>buf</CODE> - The tar entry's header buffer.
358<DT><B>Returns:</B><DD>The computed checksum.</DL>
359</DD>
360</DL>
361<!-- ========= END OF CLASS DATA ========= -->
362<HR>
363
364
365<!-- ======= START OF BOTTOM NAVBAR ====== -->
366<A NAME="navbar_bottom"><!-- --></A>
367<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
368<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
369<TR>
370<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
371<A NAME="navbar_bottom_firstrow"><!-- --></A>
372<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
373 <TR ALIGN="center" VALIGN="top">
374 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
375 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
376 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
377 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
378 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
379 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
380 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
381 </TR>
382</TABLE>
383</TD>
384<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
385</EM>
386</TD>
387</TR>
388
389<TR>
390<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
391&nbsp;<A HREF="../../../../org/apache/tools/tar/TarOutputStream.html" title="class in org.apache.tools.tar"><B>PREV CLASS</B></A>&nbsp;
392&nbsp;NEXT CLASS</FONT></TD>
393<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
394 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
395&nbsp;<A HREF="TarUtils.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
396&nbsp;<SCRIPT type="text/javascript">
397 <!--
398 if(window==top) {
399 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
400 }
401 //-->
402</SCRIPT>
403<NOSCRIPT>
404 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
405</NOSCRIPT>
406
407</FONT></TD>
408</TR>
409<TR>
410<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
411 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
412<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
413DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
414</TR>
415</TABLE>
416<A NAME="skip-navbar_bottom"></A>
417<!-- ======== END OF BOTTOM NAVBAR ======= -->
418
419<HR>
420Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
421</BODY>
422</HTML>
Note: See TracBrowser for help on using the repository browser.