source: other-projects/trunk/gs3-release-maker/apache-ant-1.6.5/build/javadocs/org/apache/tools/tar/TarOutputStream.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: 27.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:35 NZST 2007 -->
6<TITLE>
7TarOutputStream (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.tar.TarOutputStream 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="TarOutputStream (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/TarInputStream.html" title="class in org.apache.tools.tar"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../org/apache/tools/tar/TarUtils.html" title="class in org.apache.tools.tar"><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="TarOutputStream.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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 TarOutputStream</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.io.OutputStream
90 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.io.FilterOutputStream
91 <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.tar.TarOutputStream</B>
92</PRE>
93<HR>
94<DL>
95<DT>public class <B>TarOutputStream</B><DT>extends java.io.FilterOutputStream</DL>
96
97<P>
98The TarOutputStream writes a UNIX tar archive as an OutputStream.
99 Methods are provided to put entries, and then write their contents
100 by writing to this stream using write().
101<P>
102
103<P>
104<HR>
105
106<P>
107<!-- ======== NESTED CLASS SUMMARY ======== -->
108
109
110<!-- =========== FIELD SUMMARY =========== -->
111
112<A NAME="field_summary"><!-- --></A>
113<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
114<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
115<TD COLSPAN=2><FONT SIZE="+2">
116<B>Field Summary</B></FONT></TD>
117</TR>
118<TR BGCOLOR="white" CLASS="TableRowColor">
119<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
120<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
121<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#assemBuf">assemBuf</A></B></CODE>
122
123<BR>
124&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
125</TR>
126<TR BGCOLOR="white" CLASS="TableRowColor">
127<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
128<CODE>protected &nbsp;int</CODE></FONT></TD>
129<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#assemLen">assemLen</A></B></CODE>
130
131<BR>
132&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
133</TR>
134<TR BGCOLOR="white" CLASS="TableRowColor">
135<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
136<CODE>protected &nbsp;<A HREF="../../../../org/apache/tools/tar/TarBuffer.html" title="class in org.apache.tools.tar">TarBuffer</A></CODE></FONT></TD>
137<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#buffer">buffer</A></B></CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144<CODE>protected &nbsp;int</CODE></FONT></TD>
145<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#currBytes">currBytes</A></B></CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>protected &nbsp;int</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#currSize">currSize</A></B></CODE>
154
155<BR>
156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
157</TR>
158<TR BGCOLOR="white" CLASS="TableRowColor">
159<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
160<CODE>protected &nbsp;boolean</CODE></FONT></TD>
161<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#debug">debug</A></B></CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>static&nbsp;int</CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#LONGFILE_ERROR">LONGFILE_ERROR</A></B></CODE>
170
171<BR>
172&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fail if a long file name is required in the archive.</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/TarOutputStream.html#LONGFILE_GNU">LONGFILE_GNU</A></B></CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GNU tar extensions are used to store long file names in the archive.</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>static&nbsp;int</CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#LONGFILE_TRUNCATE">LONGFILE_TRUNCATE</A></B></CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Long paths will be truncated in the archive.</TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>protected &nbsp;int</CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#longFileMode">longFileMode</A></B></CODE>
194
195<BR>
196&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
197</TR>
198<TR BGCOLOR="white" CLASS="TableRowColor">
199<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
200<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
201<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#oneBuf">oneBuf</A></B></CODE>
202
203<BR>
204&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
205</TR>
206<TR BGCOLOR="white" CLASS="TableRowColor">
207<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
208<CODE>protected &nbsp;byte[]</CODE></FONT></TD>
209<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#recordBuf">recordBuf</A></B></CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
213</TR>
214</TABLE>
215&nbsp;<A NAME="fields_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
216<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
217<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
218<TD><B>Fields inherited from class java.io.FilterOutputStream</B></TD>
219</TR>
220<TR BGCOLOR="white" CLASS="TableRowColor">
221<TD><CODE>out</CODE></TD>
222</TR>
223</TABLE>
224&nbsp;
225<!-- ======== CONSTRUCTOR SUMMARY ======== -->
226
227<A NAME="constructor_summary"><!-- --></A>
228<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
229<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
230<TD COLSPAN=2><FONT SIZE="+2">
231<B>Constructor Summary</B></FONT></TD>
232</TR>
233<TR BGCOLOR="white" CLASS="TableRowColor">
234<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream)">TarOutputStream</A></B>(java.io.OutputStream&nbsp;os)</CODE>
235
236<BR>
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
238</TR>
239<TR BGCOLOR="white" CLASS="TableRowColor">
240<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream, int)">TarOutputStream</A></B>(java.io.OutputStream&nbsp;os,
241 int&nbsp;blockSize)</CODE>
242
243<BR>
244&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
245</TR>
246<TR BGCOLOR="white" CLASS="TableRowColor">
247<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream, int, int)">TarOutputStream</A></B>(java.io.OutputStream&nbsp;os,
248 int&nbsp;blockSize,
249 int&nbsp;recordSize)</CODE>
250
251<BR>
252&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
253</TR>
254</TABLE>
255&nbsp;
256<!-- ========== METHOD SUMMARY =========== -->
257
258<A NAME="method_summary"><!-- --></A>
259<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
260<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
261<TD COLSPAN=2><FONT SIZE="+2">
262<B>Method Summary</B></FONT></TD>
263</TR>
264<TR BGCOLOR="white" CLASS="TableRowColor">
265<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
266<CODE>&nbsp;void</CODE></FONT></TD>
267<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#close()">close</A></B>()</CODE>
268
269<BR>
270&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ends the TAR archive and closes the underlying OutputStream.</TD>
271</TR>
272<TR BGCOLOR="white" CLASS="TableRowColor">
273<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
274<CODE>&nbsp;void</CODE></FONT></TD>
275<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#closeEntry()">closeEntry</A></B>()</CODE>
276
277<BR>
278&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close an entry.</TD>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
282<CODE>&nbsp;void</CODE></FONT></TD>
283<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#finish()">finish</A></B>()</CODE>
284
285<BR>
286&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ends the TAR archive without closing the underlying OutputStream.</TD>
287</TR>
288<TR BGCOLOR="white" CLASS="TableRowColor">
289<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
290<CODE>&nbsp;int</CODE></FONT></TD>
291<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#getRecordSize()">getRecordSize</A></B>()</CODE>
292
293<BR>
294&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the record size being used by this stream's TarBuffer.</TD>
295</TR>
296<TR BGCOLOR="white" CLASS="TableRowColor">
297<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
298<CODE>&nbsp;void</CODE></FONT></TD>
299<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#putNextEntry(org.apache.tools.tar.TarEntry)">putNextEntry</A></B>(<A HREF="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar">TarEntry</A>&nbsp;entry)</CODE>
300
301<BR>
302&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Put an entry on the output stream.</TD>
303</TR>
304<TR BGCOLOR="white" CLASS="TableRowColor">
305<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
306<CODE>&nbsp;void</CODE></FONT></TD>
307<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#setBufferDebug(boolean)">setBufferDebug</A></B>(boolean&nbsp;debug)</CODE>
308
309<BR>
310&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the debugging flag in this stream's TarBuffer.</TD>
311</TR>
312<TR BGCOLOR="white" CLASS="TableRowColor">
313<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
314<CODE>&nbsp;void</CODE></FONT></TD>
315<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#setDebug(boolean)">setDebug</A></B>(boolean&nbsp;debugF)</CODE>
316
317<BR>
318&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the debugging flag.</TD>
319</TR>
320<TR BGCOLOR="white" CLASS="TableRowColor">
321<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
322<CODE>&nbsp;void</CODE></FONT></TD>
323<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#setLongFileMode(int)">setLongFileMode</A></B>(int&nbsp;longFileMode)</CODE>
324
325<BR>
326&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
327</TR>
328<TR BGCOLOR="white" CLASS="TableRowColor">
329<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
330<CODE>&nbsp;void</CODE></FONT></TD>
331<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#write(byte[])">write</A></B>(byte[]&nbsp;wBuf)</CODE>
332
333<BR>
334&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes bytes to the current tar archive entry.</TD>
335</TR>
336<TR BGCOLOR="white" CLASS="TableRowColor">
337<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
338<CODE>&nbsp;void</CODE></FONT></TD>
339<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#write(byte[], int, int)">write</A></B>(byte[]&nbsp;wBuf,
340 int&nbsp;wOffset,
341 int&nbsp;numToWrite)</CODE>
342
343<BR>
344&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes bytes to the current tar archive entry.</TD>
345</TR>
346<TR BGCOLOR="white" CLASS="TableRowColor">
347<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
348<CODE>&nbsp;void</CODE></FONT></TD>
349<TD><CODE><B><A HREF="../../../../org/apache/tools/tar/TarOutputStream.html#write(int)">write</A></B>(int&nbsp;b)</CODE>
350
351<BR>
352&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a byte to the current tar archive entry.</TD>
353</TR>
354</TABLE>
355&nbsp;<A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
356<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
357<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
358<TD><B>Methods inherited from class java.io.FilterOutputStream</B></TD>
359</TR>
360<TR BGCOLOR="white" CLASS="TableRowColor">
361<TD><CODE>flush</CODE></TD>
362</TR>
363</TABLE>
364&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
365<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
366<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
367<TD><B>Methods inherited from class java.lang.Object</B></TD>
368</TR>
369<TR BGCOLOR="white" CLASS="TableRowColor">
370<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
371</TR>
372</TABLE>
373&nbsp;
374<P>
375
376<!-- ============ FIELD DETAIL =========== -->
377
378<A NAME="field_detail"><!-- --></A>
379<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
380<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
381<TD COLSPAN=1><FONT SIZE="+2">
382<B>Field Detail</B></FONT></TD>
383</TR>
384</TABLE>
385
386<A NAME="LONGFILE_ERROR"><!-- --></A><H3>
387LONGFILE_ERROR</H3>
388<PRE>
389public static final int <B>LONGFILE_ERROR</B></PRE>
390<DL>
391<DD>Fail if a long file name is required in the archive.
392<P>
393<DL>
394<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_ERROR">Constant Field Values</A></DL>
395</DL>
396<HR>
397
398<A NAME="LONGFILE_TRUNCATE"><!-- --></A><H3>
399LONGFILE_TRUNCATE</H3>
400<PRE>
401public static final int <B>LONGFILE_TRUNCATE</B></PRE>
402<DL>
403<DD>Long paths will be truncated in the archive.
404<P>
405<DL>
406<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_TRUNCATE">Constant Field Values</A></DL>
407</DL>
408<HR>
409
410<A NAME="LONGFILE_GNU"><!-- --></A><H3>
411LONGFILE_GNU</H3>
412<PRE>
413public static final int <B>LONGFILE_GNU</B></PRE>
414<DL>
415<DD>GNU tar extensions are used to store long file names in the archive.
416<P>
417<DL>
418<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_GNU">Constant Field Values</A></DL>
419</DL>
420<HR>
421
422<A NAME="debug"><!-- --></A><H3>
423debug</H3>
424<PRE>
425protected boolean <B>debug</B></PRE>
426<DL>
427<DL>
428</DL>
429</DL>
430<HR>
431
432<A NAME="currSize"><!-- --></A><H3>
433currSize</H3>
434<PRE>
435protected int <B>currSize</B></PRE>
436<DL>
437<DL>
438</DL>
439</DL>
440<HR>
441
442<A NAME="currBytes"><!-- --></A><H3>
443currBytes</H3>
444<PRE>
445protected int <B>currBytes</B></PRE>
446<DL>
447<DL>
448</DL>
449</DL>
450<HR>
451
452<A NAME="oneBuf"><!-- --></A><H3>
453oneBuf</H3>
454<PRE>
455protected byte[] <B>oneBuf</B></PRE>
456<DL>
457<DL>
458</DL>
459</DL>
460<HR>
461
462<A NAME="recordBuf"><!-- --></A><H3>
463recordBuf</H3>
464<PRE>
465protected byte[] <B>recordBuf</B></PRE>
466<DL>
467<DL>
468</DL>
469</DL>
470<HR>
471
472<A NAME="assemLen"><!-- --></A><H3>
473assemLen</H3>
474<PRE>
475protected int <B>assemLen</B></PRE>
476<DL>
477<DL>
478</DL>
479</DL>
480<HR>
481
482<A NAME="assemBuf"><!-- --></A><H3>
483assemBuf</H3>
484<PRE>
485protected byte[] <B>assemBuf</B></PRE>
486<DL>
487<DL>
488</DL>
489</DL>
490<HR>
491
492<A NAME="buffer"><!-- --></A><H3>
493buffer</H3>
494<PRE>
495protected <A HREF="../../../../org/apache/tools/tar/TarBuffer.html" title="class in org.apache.tools.tar">TarBuffer</A> <B>buffer</B></PRE>
496<DL>
497<DL>
498</DL>
499</DL>
500<HR>
501
502<A NAME="longFileMode"><!-- --></A><H3>
503longFileMode</H3>
504<PRE>
505protected int <B>longFileMode</B></PRE>
506<DL>
507<DL>
508</DL>
509</DL>
510
511<!-- ========= CONSTRUCTOR DETAIL ======== -->
512
513<A NAME="constructor_detail"><!-- --></A>
514<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
515<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
516<TD COLSPAN=1><FONT SIZE="+2">
517<B>Constructor Detail</B></FONT></TD>
518</TR>
519</TABLE>
520
521<A NAME="TarOutputStream(java.io.OutputStream)"><!-- --></A><H3>
522TarOutputStream</H3>
523<PRE>
524public <B>TarOutputStream</B>(java.io.OutputStream&nbsp;os)</PRE>
525<DL>
526</DL>
527<HR>
528
529<A NAME="TarOutputStream(java.io.OutputStream, int)"><!-- --></A><H3>
530TarOutputStream</H3>
531<PRE>
532public <B>TarOutputStream</B>(java.io.OutputStream&nbsp;os,
533 int&nbsp;blockSize)</PRE>
534<DL>
535</DL>
536<HR>
537
538<A NAME="TarOutputStream(java.io.OutputStream, int, int)"><!-- --></A><H3>
539TarOutputStream</H3>
540<PRE>
541public <B>TarOutputStream</B>(java.io.OutputStream&nbsp;os,
542 int&nbsp;blockSize,
543 int&nbsp;recordSize)</PRE>
544<DL>
545</DL>
546
547<!-- ============ METHOD DETAIL ========== -->
548
549<A NAME="method_detail"><!-- --></A>
550<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
551<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
552<TD COLSPAN=1><FONT SIZE="+2">
553<B>Method Detail</B></FONT></TD>
554</TR>
555</TABLE>
556
557<A NAME="setLongFileMode(int)"><!-- --></A><H3>
558setLongFileMode</H3>
559<PRE>
560public void <B>setLongFileMode</B>(int&nbsp;longFileMode)</PRE>
561<DL>
562<DD><DL>
563</DL>
564</DD>
565</DL>
566<HR>
567
568<A NAME="setDebug(boolean)"><!-- --></A><H3>
569setDebug</H3>
570<PRE>
571public void <B>setDebug</B>(boolean&nbsp;debugF)</PRE>
572<DL>
573<DD>Sets the debugging flag.
574<P>
575<DD><DL>
576<DT><B>Parameters:</B><DD><CODE>debugF</CODE> - True to turn on debugging.</DL>
577</DD>
578</DL>
579<HR>
580
581<A NAME="setBufferDebug(boolean)"><!-- --></A><H3>
582setBufferDebug</H3>
583<PRE>
584public void <B>setBufferDebug</B>(boolean&nbsp;debug)</PRE>
585<DL>
586<DD>Sets the debugging flag in this stream's TarBuffer.
587<P>
588<DD><DL>
589<DT><B>Parameters:</B><DD><CODE>debug</CODE> - True to turn on debugging.</DL>
590</DD>
591</DL>
592<HR>
593
594<A NAME="finish()"><!-- --></A><H3>
595finish</H3>
596<PRE>
597public void <B>finish</B>()
598 throws java.io.IOException</PRE>
599<DL>
600<DD>Ends the TAR archive without closing the underlying OutputStream.
601 The result is that the two EOF records of nulls are written.
602<P>
603<DD><DL>
604
605<DT><B>Throws:</B>
606<DD><CODE>java.io.IOException</CODE></DL>
607</DD>
608</DL>
609<HR>
610
611<A NAME="close()"><!-- --></A><H3>
612close</H3>
613<PRE>
614public void <B>close</B>()
615 throws java.io.IOException</PRE>
616<DL>
617<DD>Ends the TAR archive and closes the underlying OutputStream.
618 This means that finish() is called followed by calling the
619 TarBuffer's close().
620<P>
621<DD><DL>
622
623<DT><B>Throws:</B>
624<DD><CODE>java.io.IOException</CODE></DL>
625</DD>
626</DL>
627<HR>
628
629<A NAME="getRecordSize()"><!-- --></A><H3>
630getRecordSize</H3>
631<PRE>
632public int <B>getRecordSize</B>()</PRE>
633<DL>
634<DD>Get the record size being used by this stream's TarBuffer.
635<P>
636<DD><DL>
637
638<DT><B>Returns:</B><DD>The TarBuffer record size.</DL>
639</DD>
640</DL>
641<HR>
642
643<A NAME="putNextEntry(org.apache.tools.tar.TarEntry)"><!-- --></A><H3>
644putNextEntry</H3>
645<PRE>
646public void <B>putNextEntry</B>(<A HREF="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar">TarEntry</A>&nbsp;entry)
647 throws java.io.IOException</PRE>
648<DL>
649<DD>Put an entry on the output stream. This writes the entry's
650 header record and positions the output stream for writing
651 the contents of the entry. Once this method is called, the
652 stream is ready for calls to write() to write the entry's
653 contents. Once the contents are written, closeEntry()
654 <B>MUST</B> be called to ensure that all buffered data
655 is completely written to the output stream.
656<P>
657<DD><DL>
658<DT><B>Parameters:</B><DD><CODE>entry</CODE> - The TarEntry to be written to the archive.
659<DT><B>Throws:</B>
660<DD><CODE>java.io.IOException</CODE></DL>
661</DD>
662</DL>
663<HR>
664
665<A NAME="closeEntry()"><!-- --></A><H3>
666closeEntry</H3>
667<PRE>
668public void <B>closeEntry</B>()
669 throws java.io.IOException</PRE>
670<DL>
671<DD>Close an entry. This method MUST be called for all file
672 entries that contain data. The reason is that we must
673 buffer data written to the stream in order to satisfy
674 the buffer's record based writes. Thus, there may be
675 data fragments still being assembled that must be written
676 to the output stream before this entry is closed and the
677 next entry written.
678<P>
679<DD><DL>
680
681<DT><B>Throws:</B>
682<DD><CODE>java.io.IOException</CODE></DL>
683</DD>
684</DL>
685<HR>
686
687<A NAME="write(int)"><!-- --></A><H3>
688write</H3>
689<PRE>
690public void <B>write</B>(int&nbsp;b)
691 throws java.io.IOException</PRE>
692<DL>
693<DD>Writes a byte to the current tar archive entry.
694
695 This method simply calls read( byte[], int, int ).
696<P>
697<DD><DL>
698<DT><B>Parameters:</B><DD><CODE>b</CODE> - The byte written.
699<DT><B>Throws:</B>
700<DD><CODE>java.io.IOException</CODE></DL>
701</DD>
702</DL>
703<HR>
704
705<A NAME="write(byte[])"><!-- --></A><H3>
706write</H3>
707<PRE>
708public void <B>write</B>(byte[]&nbsp;wBuf)
709 throws java.io.IOException</PRE>
710<DL>
711<DD>Writes bytes to the current tar archive entry.
712
713 This method simply calls write( byte[], int, int ).
714<P>
715<DD><DL>
716<DT><B>Parameters:</B><DD><CODE>wBuf</CODE> - The buffer to write to the archive.
717<DT><B>Throws:</B>
718<DD><CODE>java.io.IOException</CODE></DL>
719</DD>
720</DL>
721<HR>
722
723<A NAME="write(byte[], int, int)"><!-- --></A><H3>
724write</H3>
725<PRE>
726public void <B>write</B>(byte[]&nbsp;wBuf,
727 int&nbsp;wOffset,
728 int&nbsp;numToWrite)
729 throws java.io.IOException</PRE>
730<DL>
731<DD>Writes bytes to the current tar archive entry. This method
732 is aware of the current entry and will throw an exception if
733 you attempt to write bytes past the length specified for the
734 current entry. The method is also (painfully) aware of the
735 record buffering required by TarBuffer, and manages buffers
736 that are not a multiple of recordsize in length, including
737 assembling records from small buffers.
738<P>
739<DD><DL>
740<DT><B>Parameters:</B><DD><CODE>wBuf</CODE> - The buffer to write to the archive.<DD><CODE>wOffset</CODE> - The offset in the buffer from which to get bytes.<DD><CODE>numToWrite</CODE> - The number of bytes to write.
741<DT><B>Throws:</B>
742<DD><CODE>java.io.IOException</CODE></DL>
743</DD>
744</DL>
745<!-- ========= END OF CLASS DATA ========= -->
746<HR>
747
748
749<!-- ======= START OF BOTTOM NAVBAR ====== -->
750<A NAME="navbar_bottom"><!-- --></A>
751<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
752<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
753<TR>
754<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
755<A NAME="navbar_bottom_firstrow"><!-- --></A>
756<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
757 <TR ALIGN="center" VALIGN="top">
758 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
759 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
760 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
761 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
762 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
763 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
764 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
765 </TR>
766</TABLE>
767</TD>
768<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
769</EM>
770</TD>
771</TR>
772
773<TR>
774<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
775&nbsp;<A HREF="../../../../org/apache/tools/tar/TarInputStream.html" title="class in org.apache.tools.tar"><B>PREV CLASS</B></A>&nbsp;
776&nbsp;<A HREF="../../../../org/apache/tools/tar/TarUtils.html" title="class in org.apache.tools.tar"><B>NEXT CLASS</B></A></FONT></TD>
777<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
778 <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
779&nbsp;<A HREF="TarOutputStream.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
780&nbsp;<SCRIPT type="text/javascript">
781 <!--
782 if(window==top) {
783 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
784 }
785 //-->
786</SCRIPT>
787<NOSCRIPT>
788 <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
789</NOSCRIPT>
790
791</FONT></TD>
792</TR>
793<TR>
794<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
795 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
796<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
797DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
798</TR>
799</TABLE>
800<A NAME="skip-navbar_bottom"></A>
801<!-- ======== END OF BOTTOM NAVBAR ======= -->
802
803<HR>
804Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
805</BODY>
806</HTML>
Note: See TracBrowser for help on using the repository browser.