????

Your IP : 216.73.216.152


Current Path : /opt/ant/manual/api/org/apache/tools/tar/
Upload File :
Current File : //opt/ant/manual/api/org/apache/tools/tar/TarOutputStream.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:55 CEST 2012 -->
<title>TarOutputStream (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="TarOutputStream (Apache Ant API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/tar/TarInputStream.html" title="class in org.apache.tools.tar"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/tar/TarUtils.html" title="class in org.apache.tools.tar"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/tar/TarOutputStream.html" target="_top">Frames</a></li>
<li><a href="TarOutputStream.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.tar</div>
<h2 title="Class TarOutputStream" class="title">Class TarOutputStream</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.io.OutputStream</li>
<li>
<ul class="inheritance">
<li>java.io.FilterOutputStream</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.tar.TarOutputStream</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">TarOutputStream</span>
extends java.io.FilterOutputStream</pre>
<div class="block">The TarOutputStream writes a UNIX tar archive as an OutputStream.
 Methods are provided to put entries, and then write their contents
 by writing to this stream using write().</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#assemBuf">assemBuf</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#assemLen">assemLen</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="../../../../org/apache/tools/tar/TarBuffer.html" title="class in org.apache.tools.tar">TarBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#buffer">buffer</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#currBytes">currBytes</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#currName">currName</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#currSize">currSize</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#debug">debug</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#LONGFILE_ERROR">LONGFILE_ERROR</a></strong></code>
<div class="block">Fail if a long file name is required in the archive.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#LONGFILE_GNU">LONGFILE_GNU</a></strong></code>
<div class="block">GNU tar extensions are used to store long file names in the archive.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#LONGFILE_TRUNCATE">LONGFILE_TRUNCATE</a></strong></code>
<div class="block">Long paths will be truncated in the archive.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#longFileMode">longFileMode</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#oneBuf">oneBuf</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#recordBuf">recordBuf</a></strong></code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_java.io.FilterOutputStream">
<!--   -->
</a>
<h3>Fields inherited from class&nbsp;java.io.FilterOutputStream</h3>
<code>out</code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream)">TarOutputStream</a></strong>(java.io.OutputStream&nbsp;os)</code>
<div class="block">Constructor for TarInputStream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream, int)">TarOutputStream</a></strong>(java.io.OutputStream&nbsp;os,
               int&nbsp;blockSize)</code>
<div class="block">Constructor for TarInputStream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#TarOutputStream(java.io.OutputStream, int, int)">TarOutputStream</a></strong>(java.io.OutputStream&nbsp;os,
               int&nbsp;blockSize,
               int&nbsp;recordSize)</code>
<div class="block">Constructor for TarInputStream.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#close()">close</a></strong>()</code>
<div class="block">Ends the TAR archive and closes the underlying OutputStream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#closeEntry()">closeEntry</a></strong>()</code>
<div class="block">Close an entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#finish()">finish</a></strong>()</code>
<div class="block">Ends the TAR archive without closing the underlying OutputStream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#getRecordSize()">getRecordSize</a></strong>()</code>
<div class="block">Get the record size being used by this stream's TarBuffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#putNextEntry(org.apache.tools.tar.TarEntry)">putNextEntry</a></strong>(<a href="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar">TarEntry</a>&nbsp;entry)</code>
<div class="block">Put an entry on the output stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#setBufferDebug(boolean)">setBufferDebug</a></strong>(boolean&nbsp;debug)</code>
<div class="block">Sets the debugging flag in this stream's TarBuffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#setDebug(boolean)">setDebug</a></strong>(boolean&nbsp;debugF)</code>
<div class="block">Sets the debugging flag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#setLongFileMode(int)">setLongFileMode</a></strong>(int&nbsp;longFileMode)</code>
<div class="block">Set the long file mode.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#write(byte[])">write</a></strong>(byte[]&nbsp;wBuf)</code>
<div class="block">Writes bytes to the current tar archive entry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#write(byte[], int, int)">write</a></strong>(byte[]&nbsp;wBuf,
     int&nbsp;wOffset,
     int&nbsp;numToWrite)</code>
<div class="block">Writes bytes to the current tar archive entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/tar/TarOutputStream.html#write(int)">write</a></strong>(int&nbsp;b)</code>
<div class="block">Writes a byte to the current tar archive entry.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.io.FilterOutputStream">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.io.FilterOutputStream</h3>
<code>flush</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="LONGFILE_ERROR">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONGFILE_ERROR</h4>
<pre>public static final&nbsp;int LONGFILE_ERROR</pre>
<div class="block">Fail if a long file name is required in the archive.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_ERROR">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="LONGFILE_TRUNCATE">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONGFILE_TRUNCATE</h4>
<pre>public static final&nbsp;int LONGFILE_TRUNCATE</pre>
<div class="block">Long paths will be truncated in the archive.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_TRUNCATE">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="LONGFILE_GNU">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LONGFILE_GNU</h4>
<pre>public static final&nbsp;int LONGFILE_GNU</pre>
<div class="block">GNU tar extensions are used to store long file names in the archive.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.tar.TarOutputStream.LONGFILE_GNU">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="debug">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>debug</h4>
<pre>protected&nbsp;boolean debug</pre>
</li>
</ul>
<a name="currSize">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currSize</h4>
<pre>protected&nbsp;long currSize</pre>
</li>
</ul>
<a name="currName">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currName</h4>
<pre>protected&nbsp;java.lang.String currName</pre>
</li>
</ul>
<a name="currBytes">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>currBytes</h4>
<pre>protected&nbsp;long currBytes</pre>
</li>
</ul>
<a name="oneBuf">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>oneBuf</h4>
<pre>protected&nbsp;byte[] oneBuf</pre>
</li>
</ul>
<a name="recordBuf">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>recordBuf</h4>
<pre>protected&nbsp;byte[] recordBuf</pre>
</li>
</ul>
<a name="assemLen">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assemLen</h4>
<pre>protected&nbsp;int assemLen</pre>
</li>
</ul>
<a name="assemBuf">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>assemBuf</h4>
<pre>protected&nbsp;byte[] assemBuf</pre>
</li>
</ul>
<a name="buffer">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buffer</h4>
<pre>protected&nbsp;<a href="../../../../org/apache/tools/tar/TarBuffer.html" title="class in org.apache.tools.tar">TarBuffer</a> buffer</pre>
</li>
</ul>
<a name="longFileMode">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>longFileMode</h4>
<pre>protected&nbsp;int longFileMode</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="TarOutputStream(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TarOutputStream</h4>
<pre>public&nbsp;TarOutputStream(java.io.OutputStream&nbsp;os)</pre>
<div class="block">Constructor for TarInputStream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>os</code> - the output stream to use</dd></dl>
</li>
</ul>
<a name="TarOutputStream(java.io.OutputStream, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>TarOutputStream</h4>
<pre>public&nbsp;TarOutputStream(java.io.OutputStream&nbsp;os,
               int&nbsp;blockSize)</pre>
<div class="block">Constructor for TarInputStream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>os</code> - the output stream to use</dd><dd><code>blockSize</code> - the block size to use</dd></dl>
</li>
</ul>
<a name="TarOutputStream(java.io.OutputStream, int, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>TarOutputStream</h4>
<pre>public&nbsp;TarOutputStream(java.io.OutputStream&nbsp;os,
               int&nbsp;blockSize,
               int&nbsp;recordSize)</pre>
<div class="block">Constructor for TarInputStream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>os</code> - the output stream to use</dd><dd><code>blockSize</code> - the block size to use</dd><dd><code>recordSize</code> - the record size to use</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="setLongFileMode(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLongFileMode</h4>
<pre>public&nbsp;void&nbsp;setLongFileMode(int&nbsp;longFileMode)</pre>
<div class="block">Set the long file mode.
 This can be LONGFILE_ERROR(0), LONGFILE_TRUNCATE(1) or LONGFILE_GNU(2).
 This specifies the treatment of long file names (names >= TarConstants.NAMELEN).
 Default is LONGFILE_ERROR.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>longFileMode</code> - the mode to use</dd></dl>
</li>
</ul>
<a name="setDebug(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDebug</h4>
<pre>public&nbsp;void&nbsp;setDebug(boolean&nbsp;debugF)</pre>
<div class="block">Sets the debugging flag.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>debugF</code> - True to turn on debugging.</dd></dl>
</li>
</ul>
<a name="setBufferDebug(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBufferDebug</h4>
<pre>public&nbsp;void&nbsp;setBufferDebug(boolean&nbsp;debug)</pre>
<div class="block">Sets the debugging flag in this stream's TarBuffer.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>debug</code> - True to turn on debugging.</dd></dl>
</li>
</ul>
<a name="finish()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finish</h4>
<pre>public&nbsp;void&nbsp;finish()
            throws java.io.IOException</pre>
<div class="block">Ends the TAR archive without closing the underlying OutputStream.
 The result is that the two EOF records of nulls are written.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="close()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
           throws java.io.IOException</pre>
<div class="block">Ends the TAR archive and closes the underlying OutputStream.
 This means that finish() is called followed by calling the
 TarBuffer's close().</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code>close</code>&nbsp;in class&nbsp;<code>java.io.FilterOutputStream</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="getRecordSize()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRecordSize</h4>
<pre>public&nbsp;int&nbsp;getRecordSize()</pre>
<div class="block">Get the record size being used by this stream's TarBuffer.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The TarBuffer record size.</dd></dl>
</li>
</ul>
<a name="putNextEntry(org.apache.tools.tar.TarEntry)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNextEntry</h4>
<pre>public&nbsp;void&nbsp;putNextEntry(<a href="../../../../org/apache/tools/tar/TarEntry.html" title="class in org.apache.tools.tar">TarEntry</a>&nbsp;entry)
                  throws java.io.IOException</pre>
<div class="block">Put an entry on the output stream. This writes the entry's
 header record and positions the output stream for writing
 the contents of the entry. Once this method is called, the
 stream is ready for calls to write() to write the entry's
 contents. Once the contents are written, closeEntry()
 <B>MUST</B> be called to ensure that all buffered data
 is completely written to the output stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>entry</code> - The TarEntry to be written to the archive.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="closeEntry()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>closeEntry</h4>
<pre>public&nbsp;void&nbsp;closeEntry()
                throws java.io.IOException</pre>
<div class="block">Close an entry. This method MUST be called for all file
 entries that contain data. The reason is that we must
 buffer data written to the stream in order to satisfy
 the buffer's record based writes. Thus, there may be
 data fragments still being assembled that must be written
 to the output stream before this entry is closed and the
 next entry written.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="write(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(int&nbsp;b)
           throws java.io.IOException</pre>
<div class="block">Writes a byte to the current tar archive entry.

 This method simply calls read( byte[], int, int ).</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>write</code>&nbsp;in class&nbsp;<code>java.io.FilterOutputStream</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The byte written.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="write(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(byte[]&nbsp;wBuf)
           throws java.io.IOException</pre>
<div class="block">Writes bytes to the current tar archive entry.

 This method simply calls write( byte[], int, int ).</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>write</code>&nbsp;in class&nbsp;<code>java.io.FilterOutputStream</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>wBuf</code> - The buffer to write to the archive.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
<a name="write(byte[], int, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(byte[]&nbsp;wBuf,
         int&nbsp;wOffset,
         int&nbsp;numToWrite)
           throws java.io.IOException</pre>
<div class="block">Writes bytes to the current tar archive entry. This method
 is aware of the current entry and will throw an exception if
 you attempt to write bytes past the length specified for the
 current entry. The method is also (painfully) aware of the
 record buffering required by TarBuffer, and manages buffers
 that are not a multiple of recordsize in length, including
 assembling records from small buffers.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>write</code>&nbsp;in class&nbsp;<code>java.io.FilterOutputStream</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>wBuf</code> - The buffer to write to the archive.</dd><dd><code>wOffset</code> - The offset in the buffer from which to get bytes.</dd><dd><code>numToWrite</code> - The number of bytes to write.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/tar/TarInputStream.html" title="class in org.apache.tools.tar"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/tar/TarUtils.html" title="class in org.apache.tools.tar"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/tar/TarOutputStream.html" target="_top">Frames</a></li>
<li><a href="TarOutputStream.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>