????

Your IP : 216.73.216.152


Current Path : /opt/ant/manual/api/org/apache/tools/zip/
Upload File :
Current File : //opt/ant/manual/api/org/apache/tools/zip/ZipOutputStream.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>ZipOutputStream (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="ZipOutputStream (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/zip/ZipLong.html" title="class in org.apache.tools.zip"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/zip/ZipOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.tools.zip"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/zip/ZipOutputStream.html" target="_top">Frames</a></li>
<li><a href="ZipOutputStream.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><a href="#nested_class_summary">Nested</a>&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.zip</div>
<h2 title="Class ZipOutputStream" class="title">Class ZipOutputStream</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.zip.ZipOutputStream</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">ZipOutputStream</span>
extends java.io.FilterOutputStream</pre>
<div class="block">Reimplementation of <code>java.util.zip.ZipOutputStream</code> that does handle the extended
 functionality of this package, especially internal/external file
 attributes and extra fields with different layouts for local file
 data and central directory entries.

 <p>This class will try to use <code>RandomAccessFile</code> when you know that the output is going to go to a
 file.</p>

 <p>If RandomAccessFile cannot be used, this implementation will use
 a Data Descriptor to store size and CRC information for <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#DEFLATED"><code>DEFLATED</code></a> entries, this means, you don't need to
 calculate them yourself.  Unfortunately this is not possible for
 the <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED"><code>STORED</code></a> method, here setting the CRC and
 uncompressed size information is required before <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#putNextEntry(org.apache.tools.zip.ZipEntry)"><code>putNextEntry</code></a> can be called.</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.tools.zip">ZipOutputStream.UnicodeExtraFieldPolicy</a></strong></code>
<div class="block">enum that represents the possible policies for creating Unicode
 extra fields.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- =========== 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/zip/ZipOutputStream.html#buf">buf</a></strong></code>
<div class="block">This buffer servers as a Deflater.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#CFH_SIG">CFH_SIG</a></strong></code>
<div class="block">central file header signature</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#DD_SIG">DD_SIG</a></strong></code>
<div class="block">data descriptor signature</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected java.util.zip.Deflater</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#def">def</a></strong></code>
<div class="block">This Deflater object is used for output.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#DEFAULT_COMPRESSION">DEFAULT_COMPRESSION</a></strong></code>
<div class="block">Default compression level for deflated entries.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#DEFLATED">DEFLATED</a></strong></code>
<div class="block">Compression method for deflated entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#EFS_FLAG">EFS_FLAG</a></strong></code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>use <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#UFT8_NAMES_FLAG"><code>UFT8_NAMES_FLAG</code></a> instead</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#EOCD_SIG">EOCD_SIG</a></strong></code>
<div class="block">end of central dir signature</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#LFH_SIG">LFH_SIG</a></strong></code>
<div class="block">local file header signature</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED">STORED</a></strong></code>
<div class="block">Compression method for stored entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#UFT8_NAMES_FLAG">UFT8_NAMES_FLAG</a></strong></code>
<div class="block">General purpose flag, which indicates that filenames are
 written in utf-8.</div>
</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/zip/ZipOutputStream.html#ZipOutputStream(java.io.File)">ZipOutputStream</a></strong>(java.io.File&nbsp;file)</code>
<div class="block">Creates a new ZIP OutputStream writing to a File.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#ZipOutputStream(java.io.OutputStream)">ZipOutputStream</a></strong>(java.io.OutputStream&nbsp;out)</code>
<div class="block">Creates a new ZIP OutputStream filtering the underlying stream.</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>protected static long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#adjustToLong(int)">adjustToLong</a></strong>(int&nbsp;i)</code>
<div class="block">Assumes a negative integer really is a positive integer that
 has wrapped around and re-creates the original value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#close()">close</a></strong>()</code>
<div class="block">Closes this output stream and releases any system resources
 associated with the stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#closeEntry()">closeEntry</a></strong>()</code>
<div class="block">Writes all necessary data for this entry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#deflate()">deflate</a></strong>()</code>
<div class="block">Writes next block of compressed data to the output stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#finish()">finish</a></strong>()</code>
<div class="block">Finishs writing the contents and closes this as well as the
 underlying stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#flush()">flush</a></strong>()</code>
<div class="block">Flushes this output stream and forces any buffered output bytes
 to be written out to the stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#getBytes(java.lang.String)">getBytes</a></strong>(java.lang.String&nbsp;name)</code>
<div class="block">Retrieve the bytes for the given String in the encoding set for
 this Stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#getEncoding()">getEncoding</a></strong>()</code>
<div class="block">The encoding to use for filenames and the file comment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#isSeekable()">isSeekable</a></strong>()</code>
<div class="block">This method indicates whether this archive is writing to a
 seekable stream (i.e., to a random access file).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#putNextEntry(org.apache.tools.zip.ZipEntry)">putNextEntry</a></strong>(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)</code>
<div class="block">Begin writing next entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setComment(java.lang.String)">setComment</a></strong>(java.lang.String&nbsp;comment)</code>
<div class="block">Set the file comment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setCreateUnicodeExtraFields(org.apache.tools.zip.ZipOutputStream.UnicodeExtraFieldPolicy)">setCreateUnicodeExtraFields</a></strong>(<a href="../../../../org/apache/tools/zip/ZipOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.tools.zip">ZipOutputStream.UnicodeExtraFieldPolicy</a>&nbsp;b)</code>
<div class="block">Whether to create Unicode Extra Fields.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setEncoding(java.lang.String)">setEncoding</a></strong>(java.lang.String&nbsp;encoding)</code>
<div class="block">The encoding to use for filenames and the file comment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setFallbackToUTF8(boolean)">setFallbackToUTF8</a></strong>(boolean&nbsp;b)</code>
<div class="block">Whether to fall back to UTF and the language encoding flag if
 the file name cannot be encoded using the specified encoding.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setLevel(int)">setLevel</a></strong>(int&nbsp;level)</code>
<div class="block">Sets the compression level for subsequent entries.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setMethod(int)">setMethod</a></strong>(int&nbsp;method)</code>
<div class="block">Sets the default compression method for subsequent entries.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#setUseLanguageEncodingFlag(boolean)">setUseLanguageEncodingFlag</a></strong>(boolean&nbsp;b)</code>
<div class="block">Whether to set the language encoding flag if the file name
 encoding is UTF-8.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected static <a href="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#toDosTime(java.util.Date)">toDosTime</a></strong>(java.util.Date&nbsp;time)</code>
<div class="block">Convert a Date object to a DOS date/time field.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#toDosTime(long)">toDosTime</a></strong>(long&nbsp;t)</code>
<div class="block">Convert a Date object to a DOS date/time field.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#write(byte[], int, int)">write</a></strong>(byte[]&nbsp;b,
     int&nbsp;offset,
     int&nbsp;length)</code>
<div class="block">Writes bytes to ZIP entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#write(int)">write</a></strong>(int&nbsp;b)</code>
<div class="block">Writes a single byte to ZIP entry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeCentralDirectoryEnd()">writeCentralDirectoryEnd</a></strong>()</code>
<div class="block">Writes the &quot;End of central dir record&quot;.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeCentralFileHeader(org.apache.tools.zip.ZipEntry)">writeCentralFileHeader</a></strong>(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)</code>
<div class="block">Writes the central file header entry.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeDataDescriptor(org.apache.tools.zip.ZipEntry)">writeDataDescriptor</a></strong>(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)</code>
<div class="block">Writes the data descriptor entry.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeLocalFileHeader(org.apache.tools.zip.ZipEntry)">writeLocalFileHeader</a></strong>(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)</code>
<div class="block">Writes the local file header entry</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeOut(byte[])">writeOut</a></strong>(byte[]&nbsp;data)</code>
<div class="block">Write bytes to output or random access file.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/zip/ZipOutputStream.html#writeOut(byte[], int, int)">writeOut</a></strong>(byte[]&nbsp;data,
        int&nbsp;offset,
        int&nbsp;length)</code>
<div class="block">Write bytes to output or random access file.</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>write</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="DEFLATED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFLATED</h4>
<pre>public static final&nbsp;int DEFLATED</pre>
<div class="block">Compression method for deflated entries.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.DEFLATED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="DEFAULT_COMPRESSION">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_COMPRESSION</h4>
<pre>public static final&nbsp;int DEFAULT_COMPRESSION</pre>
<div class="block">Default compression level for deflated entries.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>Ant 1.7</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.DEFAULT_COMPRESSION">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="STORED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>STORED</h4>
<pre>public static final&nbsp;int STORED</pre>
<div class="block">Compression method for stored entries.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.STORED">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="UFT8_NAMES_FLAG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UFT8_NAMES_FLAG</h4>
<pre>public static final&nbsp;int UFT8_NAMES_FLAG</pre>
<div class="block">General purpose flag, which indicates that filenames are
 written in utf-8.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.UFT8_NAMES_FLAG">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="EFS_FLAG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EFS_FLAG</h4>
<pre>public static final&nbsp;int EFS_FLAG</pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>use <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#UFT8_NAMES_FLAG"><code>UFT8_NAMES_FLAG</code></a> instead</i></div>
<div class="block">General purpose flag, which indicates that filenames are
 written in utf-8.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.EFS_FLAG">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="def">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>def</h4>
<pre>protected&nbsp;java.util.zip.Deflater def</pre>
<div class="block">This Deflater object is used for output.

 <p>This attribute is only protected to provide a level of API
 backwards compatibility.  This class used to extend <code>DeflaterOutputStream</code> up to
 Revision 1.13.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="buf">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>buf</h4>
<pre>protected&nbsp;byte[] buf</pre>
<div class="block">This buffer servers as a Deflater.

 <p>This attribute is only protected to provide a level of API
 backwards compatibility.  This class used to extend <code>DeflaterOutputStream</code> up to
 Revision 1.13.</p></div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="LFH_SIG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LFH_SIG</h4>
<pre>protected static final&nbsp;byte[] LFH_SIG</pre>
<div class="block">local file header signature</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="DD_SIG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DD_SIG</h4>
<pre>protected static final&nbsp;byte[] DD_SIG</pre>
<div class="block">data descriptor signature</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="CFH_SIG">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CFH_SIG</h4>
<pre>protected static final&nbsp;byte[] CFH_SIG</pre>
<div class="block">central file header signature</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="EOCD_SIG">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EOCD_SIG</h4>
<pre>protected static final&nbsp;byte[] EOCD_SIG</pre>
<div class="block">end of central dir signature</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="ZipOutputStream(java.io.OutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ZipOutputStream</h4>
<pre>public&nbsp;ZipOutputStream(java.io.OutputStream&nbsp;out)</pre>
<div class="block">Creates a new ZIP OutputStream filtering the underlying stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the outputstream to zip</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="ZipOutputStream(java.io.File)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ZipOutputStream</h4>
<pre>public&nbsp;ZipOutputStream(java.io.File&nbsp;file)
                throws java.io.IOException</pre>
<div class="block">Creates a new ZIP OutputStream writing to a File.  Will use
 random access if possible.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>file</code> - the file to zip to</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</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="isSeekable()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSeekable</h4>
<pre>public&nbsp;boolean&nbsp;isSeekable()</pre>
<div class="block">This method indicates whether this archive is writing to a
 seekable stream (i.e., to a random access file).

 <p>For seekable streams, you don't need to calculate the CRC or
 uncompressed size for <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED"><code>STORED</code></a> entries before
 invoking <a href="../../../../org/apache/tools/zip/ZipOutputStream.html#putNextEntry(org.apache.tools.zip.ZipEntry)"><code>putNextEntry(org.apache.tools.zip.ZipEntry)</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if seekable</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.17</dd></dl>
</li>
</ul>
<a name="setEncoding(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEncoding</h4>
<pre>public&nbsp;void&nbsp;setEncoding(java.lang.String&nbsp;encoding)</pre>
<div class="block">The encoding to use for filenames and the file comment.

 <p>For a list of possible values see <a
 href="http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html">http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html</a>.
 Defaults to the platform's default character encoding.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>encoding</code> - the encoding value</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.3</dd></dl>
</li>
</ul>
<a name="getEncoding()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoding</h4>
<pre>public&nbsp;java.lang.String&nbsp;getEncoding()</pre>
<div class="block">The encoding to use for filenames and the file comment.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>null if using the platform's default character encoding.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.3</dd></dl>
</li>
</ul>
<a name="setUseLanguageEncodingFlag(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUseLanguageEncodingFlag</h4>
<pre>public&nbsp;void&nbsp;setUseLanguageEncodingFlag(boolean&nbsp;b)</pre>
<div class="block">Whether to set the language encoding flag if the file name
 encoding is UTF-8.

 <p>Defaults to true.</p></div>
</li>
</ul>
<a name="setCreateUnicodeExtraFields(org.apache.tools.zip.ZipOutputStream.UnicodeExtraFieldPolicy)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCreateUnicodeExtraFields</h4>
<pre>public&nbsp;void&nbsp;setCreateUnicodeExtraFields(<a href="../../../../org/apache/tools/zip/ZipOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.tools.zip">ZipOutputStream.UnicodeExtraFieldPolicy</a>&nbsp;b)</pre>
<div class="block">Whether to create Unicode Extra Fields.

 <p>Defaults to NEVER.</p></div>
</li>
</ul>
<a name="setFallbackToUTF8(boolean)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFallbackToUTF8</h4>
<pre>public&nbsp;void&nbsp;setFallbackToUTF8(boolean&nbsp;b)</pre>
<div class="block">Whether to fall back to UTF and the language encoding flag if
 the file name cannot be encoded using the specified encoding.

 <p>Defaults to false.</p></div>
</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">Finishs writing the contents and closes this as well as the
 underlying stream.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</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">Writes all necessary data for this entry.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="putNextEntry(org.apache.tools.zip.ZipEntry)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNextEntry</h4>
<pre>public&nbsp;void&nbsp;putNextEntry(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)
                  throws java.io.IOException</pre>
<div class="block">Begin writing next entry.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="setComment(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setComment</h4>
<pre>public&nbsp;void&nbsp;setComment(java.lang.String&nbsp;comment)</pre>
<div class="block">Set the file comment.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>comment</code> - the comment</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="setLevel(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLevel</h4>
<pre>public&nbsp;void&nbsp;setLevel(int&nbsp;level)</pre>
<div class="block">Sets the compression level for subsequent entries.

 <p>Default is Deflater.DEFAULT_COMPRESSION.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>level</code> - the compression level.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.IllegalArgumentException</code> - if an invalid compression
 level is specified.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="setMethod(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMethod</h4>
<pre>public&nbsp;void&nbsp;setMethod(int&nbsp;method)</pre>
<div class="block">Sets the default compression method for subsequent entries.

 <p>Default is DEFLATED.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>method</code> - an <code>int</code> from java.util.zip.ZipEntry</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="write(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(byte[]&nbsp;b,
         int&nbsp;offset,
         int&nbsp;length)
           throws java.io.IOException</pre>
<div class="block">Writes bytes to ZIP entry.</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 array to write</dd><dd><code>offset</code> - the start position to write from</dd><dd><code>length</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>
<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 single byte to ZIP entry.

 <p>Delegates to the three arg method.</p></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 to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</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">Closes this output stream and releases any system resources
 associated with the stream.</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> - if an I/O error occurs.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="flush()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>flush</h4>
<pre>public&nbsp;void&nbsp;flush()
           throws java.io.IOException</pre>
<div class="block">Flushes this output stream and forces any buffered output bytes
 to be written out to the stream.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>flush</code>&nbsp;in interface&nbsp;<code>java.io.Flushable</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code>flush</code>&nbsp;in class&nbsp;<code>java.io.FilterOutputStream</code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - if an I/O error occurs.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="deflate()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deflate</h4>
<pre>protected final&nbsp;void&nbsp;deflate()
                      throws java.io.IOException</pre>
<div class="block">Writes next block of compressed data to the output stream.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="writeLocalFileHeader(org.apache.tools.zip.ZipEntry)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeLocalFileHeader</h4>
<pre>protected&nbsp;void&nbsp;writeLocalFileHeader(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)
                             throws java.io.IOException</pre>
<div class="block">Writes the local file header entry</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="writeDataDescriptor(org.apache.tools.zip.ZipEntry)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeDataDescriptor</h4>
<pre>protected&nbsp;void&nbsp;writeDataDescriptor(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)
                            throws java.io.IOException</pre>
<div class="block">Writes the data descriptor entry.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="writeCentralFileHeader(org.apache.tools.zip.ZipEntry)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeCentralFileHeader</h4>
<pre>protected&nbsp;void&nbsp;writeCentralFileHeader(<a href="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</a>&nbsp;ze)
                               throws java.io.IOException</pre>
<div class="block">Writes the central file header entry.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="writeCentralDirectoryEnd()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeCentralDirectoryEnd</h4>
<pre>protected&nbsp;void&nbsp;writeCentralDirectoryEnd()
                                 throws java.io.IOException</pre>
<div class="block">Writes the &quot;End of central dir record&quot;.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="toDosTime(java.util.Date)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDosTime</h4>
<pre>protected static&nbsp;<a href="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</a>&nbsp;toDosTime(java.util.Date&nbsp;time)</pre>
<div class="block">Convert a Date object to a DOS date/time field.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>time</code> - the <code>Date</code> to convert</dd>
<dt><span class="strong">Returns:</span></dt><dd>the date as a <code>ZipLong</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>1.1</dd></dl>
</li>
</ul>
<a name="toDosTime(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDosTime</h4>
<pre>protected static&nbsp;byte[]&nbsp;toDosTime(long&nbsp;t)</pre>
<div class="block">Convert a Date object to a DOS date/time field.

 <p>Stolen from InfoZip's <code>fileio.c</code></p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>t</code> - number of milliseconds since the epoch</dd>
<dt><span class="strong">Returns:</span></dt><dd>the date as a byte array</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.26</dd></dl>
</li>
</ul>
<a name="getBytes(java.lang.String)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getBytes</h4>
<pre>protected&nbsp;byte[]&nbsp;getBytes(java.lang.String&nbsp;name)
                   throws java.util.zip.ZipException</pre>
<div class="block">Retrieve the bytes for the given String in the encoding set for
 this Stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the string to get bytes from</dd>
<dt><span class="strong">Returns:</span></dt><dd>the bytes as a byte array</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.util.zip.ZipException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.3</dd></dl>
</li>
</ul>
<a name="writeOut(byte[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeOut</h4>
<pre>protected final&nbsp;void&nbsp;writeOut(byte[]&nbsp;data)
                       throws java.io.IOException</pre>
<div class="block">Write bytes to output or random access file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - the byte array to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="writeOut(byte[], int, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>writeOut</h4>
<pre>protected final&nbsp;void&nbsp;writeOut(byte[]&nbsp;data,
            int&nbsp;offset,
            int&nbsp;length)
                       throws java.io.IOException</pre>
<div class="block">Write bytes to output or random access file.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - the byte array to write</dd><dd><code>offset</code> - the start position to write from</dd><dd><code>length</code> - the number of bytes to write</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.io.IOException</code> - on error</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.14</dd></dl>
</li>
</ul>
<a name="adjustToLong(int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>adjustToLong</h4>
<pre>protected static&nbsp;long&nbsp;adjustToLong(int&nbsp;i)</pre>
<div class="block">Assumes a negative integer really is a positive integer that
 has wrapped around and re-creates the original value.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>i</code> - the value to treat as unsigned int.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the unsigned int as a long.</dd><dt><span class="strong">Since:</span></dt>
  <dd>1.34</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/zip/ZipLong.html" title="class in org.apache.tools.zip"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/zip/ZipOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.tools.zip"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/zip/ZipOutputStream.html" target="_top">Frames</a></li>
<li><a href="ZipOutputStream.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><a href="#nested_class_summary">Nested</a>&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>