12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!-- NewPage -->
- <html lang="de">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>ZipArchiveOutputStream (Apache Commons Compress 1.13 API)</title>
- <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
- </head>
- <body>
- <script type="text/javascript"><!--
- try {
- if (location.href.indexOf('is-external=true') == -1) {
- parent.document.title="ZipArchiveOutputStream (Apache Commons Compress 1.13 API)";
- }
- }
- catch(err) {
- }
- //-->
- </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="class-use/ZipArchiveOutputStream.html">Use</a></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/commons/compress/archivers/zip/ZipArchiveInputStream.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Prev Class</span></a></li>
- <li><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../../../index.html?org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html" target="_top">Frames</a></li>
- <li><a href="ZipArchiveOutputStream.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: </li>
- <li><a href="#nested_class_summary">Nested</a> | </li>
- <li><a href="#field_summary">Field</a> | </li>
- <li><a href="#constructor_summary">Constr</a> | </li>
- <li><a href="#method_summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li><a href="#field_detail">Field</a> | </li>
- <li><a href="#constructor_detail">Constr</a> | </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.commons.compress.archivers.zip</div>
- <h2 title="Class ZipArchiveOutputStream" class="title">Class ZipArchiveOutputStream</h2>
- </div>
- <div class="contentContainer">
- <ul class="inheritance">
- <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
- <li>
- <ul class="inheritance">
- <li><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">java.io.OutputStream</a></li>
- <li>
- <ul class="inheritance">
- <li><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">org.apache.commons.compress.archivers.ArchiveOutputStream</a></li>
- <li>
- <ul class="inheritance">
- <li>org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream</li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- <div class="description">
- <ul class="blockList">
- <li class="blockList">
- <dl>
- <dt>All Implemented Interfaces:</dt>
- <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
- </dl>
- <dl>
- <dt>Direct Known Subclasses:</dt>
- <dd><a href="../../../../../../org/apache/commons/compress/archivers/jar/JarArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers.jar">JarArchiveOutputStream</a></dd>
- </dl>
- <hr>
- <br>
- <pre>public class <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.82">ZipArchiveOutputStream</a>
- extends <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></pre>
- <div class="block">Reimplementation of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/ZipOutputStream.html?is-external=true" title="class or interface in java.util.zip"><code>java.util.zip.ZipOutputStream</code></a> 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 <a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels"><code>SeekableByteChannel</code></a> when it knows that the
- output is going to go to a file.</p>
- <p>If SeekableByteChannel cannot be used, this implementation will use
- a Data Descriptor to store size and CRC information for <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#STORED"><code>STORED</code></a> method, here setting the CRC and
- uncompressed size information is required before <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(ArchiveEntry)</code></a> can be called.</p>
- <p>As of Apache Commons Compress 1.3 it transparently supports Zip64
- extensions and thus individual entries and archives larger than 4
- GB or with more than 65536 entries in most cases but explicit
- control is provided via <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)"><code>setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)</code></a>. If the stream can not
- use SeekableByteChannel and you try to write a ZipArchiveEntry of
- unknown size then Zip64 extensions will be disabled by default.</p></div>
- <dl><dt><span class="strong">This class is not thread-safe</span></dt>
- <dd></dd></dl>
- </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"> </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 </code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveOutputStream.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"> </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 <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Deflater.html?is-external=true" title="class or interface in java.util.zip">Deflater</a></code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#def">def</a></strong></code>
- <div class="block">This Deflater object is used for output.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>static int</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#DEFAULT_COMPRESSION">DEFAULT_COMPRESSION</a></strong></code>
- <div class="block">Default compression level 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#DEFLATED">DEFLATED</a></strong></code>
- <div class="block">Compression method 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#EFS_FLAG">EFS_FLAG</a></strong></code>
- <div class="block"><strong>Deprecated.</strong>
- <div class="block"><i>use <a href="../../../../../../org/apache/commons/compress/archivers/zip/GeneralPurposeBit.html#UFT8_NAMES_FLAG"><code>GeneralPurposeBit.UFT8_NAMES_FLAG</code></a> instead</i></div>
- </div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected boolean</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#finished">finished</a></strong></code>
- <div class="block">indicates if this archive is finished. protected for use in Jar implementation</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>static int</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#STORED">STORED</a></strong></code>
- <div class="block">Compression method for stored entries.</div>
- </td>
- </tr>
- </table>
- </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"> </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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#ZipArchiveOutputStream(java.io.File)">ZipArchiveOutputStream</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#ZipArchiveOutputStream(java.io.OutputStream)">ZipArchiveOutputStream</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> out)</code>
- <div class="block">Creates a new ZIP OutputStream filtering the underlying stream.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#ZipArchiveOutputStream(java.nio.channels.SeekableByteChannel)">ZipArchiveOutputStream</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a> channel)</code>
- <div class="block">Creates a new ZIP OutputStream writing to a SeekableByteChannel.</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"> </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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#addRawArchiveEntry(org.apache.commons.compress.archivers.zip.ZipArchiveEntry,%20java.io.InputStream)">addRawArchiveEntry</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> entry,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> rawStream)</code>
- <div class="block">Adds an archive entry with a raw input stream.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#canWriteEntryData(org.apache.commons.compress.archivers.ArchiveEntry)">canWriteEntryData</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a> ae)</code>
- <div class="block">Whether this stream is able to write the given entry.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.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="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#closeArchiveEntry()">closeArchiveEntry</a></strong>()</code>
- <div class="block">Writes all necessary data for this entry.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a></code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#createArchiveEntry(java.io.File,%20java.lang.String)">createArchiveEntry</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> inputFile,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> entryName)</code>
- <div class="block">Creates a new zip entry taking some information from the given
- file and using the provided name.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#finish()">finish</a></strong>()</code>
- <div class="block">Finishes the addition of entries to this stream, without closing it.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.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><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#getEncoding()">getEncoding</a></strong>()</code>
- <div class="block">The encoding to use for filenames and the file comment.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>boolean</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.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="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)">putArchiveEntry</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a> archiveEntry)</code>
- <div class="block">Writes the headers for an archive entry to 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setComment(java.lang.String)">setComment</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> comment)</code>
- <div class="block">Set the file comment.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setCreateUnicodeExtraFields(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.UnicodeExtraFieldPolicy)">setCreateUnicodeExtraFields</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveOutputStream.UnicodeExtraFieldPolicy</a> b)</code>
- <div class="block">Whether to create Unicode Extra Fields.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setEncoding(java.lang.String)">setEncoding</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> encoding)</code>
- <div class="block">The encoding to use for filenames and the file comment.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setFallbackToUTF8(boolean)">setFallbackToUTF8</a></strong>(boolean 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="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setLevel(int)">setLevel</a></strong>(int level)</code>
- <div class="block">Sets the compression level 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setMethod(int)">setMethod</a></strong>(int method)</code>
- <div class="block">Sets the default compression method 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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseLanguageEncodingFlag(boolean)">setUseLanguageEncodingFlag</a></strong>(boolean 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="altColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)">setUseZip64</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html" title="enum in org.apache.commons.compress.archivers.zip">Zip64Mode</a> mode)</code>
- <div class="block">Whether Zip64 extensions will be used.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#write(byte[],%20int,%20int)">write</a></strong>(byte[] b,
- int offset,
- int length)</code>
- <div class="block">Writes bytes to ZIP entry.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeCentralDirectoryEnd()">writeCentralDirectoryEnd</a></strong>()</code>
- <div class="block">Writes the "End of central dir record".</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeCentralFileHeader(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">writeCentralFileHeader</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)</code>
- <div class="block">Writes the central file header entry.</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeDataDescriptor(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">writeDataDescriptor</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)</code>
- <div class="block">Writes the data descriptor entry.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeLocalFileHeader(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">writeLocalFileHeader</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)</code>
- <div class="block">Writes the local file header entry</div>
- </td>
- </tr>
- <tr class="altColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeOut(byte[])">writeOut</a></strong>(byte[] data)</code>
- <div class="block">Write bytes to output or random access file.</div>
- </td>
- </tr>
- <tr class="rowColor">
- <td class="colFirst"><code>protected void</code></td>
- <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeOut(byte[],%20int,%20int)">writeOut</a></strong>(byte[] data,
- int offset,
- int length)</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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#writeZip64CentralDirectory()">writeZip64CentralDirectory</a></strong>()</code>
- <div class="block">Writes the "ZIP64 End of central dir record" and
- "ZIP64 End of central dir locator".</div>
- </td>
- </tr>
- </table>
- <ul class="blockList">
- <li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.compress.archivers.ArchiveOutputStream">
- <!-- -->
- </a>
- <h3>Methods inherited from class org.apache.commons.compress.archivers.<a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></h3>
- <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#count(int)">count</a>, <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#count(long)">count</a>, <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#getBytesWritten()">getBytesWritten</a>, <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#getCount()">getCount</a>, <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#write(int)">write</a></code></li>
- </ul>
- <ul class="blockList">
- <li class="blockList"><a name="methods_inherited_from_class_java.io.OutputStream">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.io.<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></h3>
- <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#write(byte[])" title="class or interface in java.io">write</a></code></li>
- </ul>
- <ul class="blockList">
- <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
- <!-- -->
- </a>
- <h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
- <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></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="finished">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>finished</h4>
- <pre>protected boolean <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.115">finished</a></pre>
- <div class="block">indicates if this archive is finished. protected for use in Jar implementation</div>
- </li>
- </ul>
- <a name="DEFLATED">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>DEFLATED</h4>
- <pre>public static final int <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.120">DEFLATED</a></pre>
- <div class="block">Compression method for deflated entries.</div>
- <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.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 int <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.125">DEFAULT_COMPRESSION</a></pre>
- <div class="block">Default compression level for deflated entries.</div>
- <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.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 int <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.130">STORED</a></pre>
- <div class="block">Compression method for stored entries.</div>
- <dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../constant-values.html#org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.STORED">Constant Field Values</a></dd></dl>
- </li>
- </ul>
- <a name="EFS_FLAG">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>EFS_FLAG</h4>
- <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
- public static final int <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.143">EFS_FLAG</a></pre>
- <div class="block"><span class="strong">Deprecated.</span> <i>use <a href="../../../../../../org/apache/commons/compress/archivers/zip/GeneralPurposeBit.html#UFT8_NAMES_FLAG"><code>GeneralPurposeBit.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.commons.compress.archivers.zip.ZipArchiveOutputStream.EFS_FLAG">Constant Field Values</a></dd></dl>
- </li>
- </ul>
- <a name="def">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>def</h4>
- <pre>protected final <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Deflater.html?is-external=true" title="class or interface in java.util.zip">Deflater</a> <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.232">def</a></pre>
- <div class="block">This Deflater object is used for output.</div>
- </li>
- </ul>
- </li>
- </ul>
- <!-- ========= CONSTRUCTOR DETAIL ======== -->
- <ul class="blockList">
- <li class="blockList"><a name="constructor_detail">
- <!-- -->
- </a>
- <h3>Constructor Detail</h3>
- <a name="ZipArchiveOutputStream(java.io.OutputStream)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>ZipArchiveOutputStream</h4>
- <pre>public <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.272">ZipArchiveOutputStream</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> 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></dl>
- </li>
- </ul>
- <a name="ZipArchiveOutputStream(java.io.File)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>ZipArchiveOutputStream</h4>
- <pre>public <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.285">ZipArchiveOutputStream</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> file)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="ZipArchiveOutputStream(java.nio.channels.SeekableByteChannel)">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>ZipArchiveOutputStream</h4>
- <pre>public <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.320">ZipArchiveOutputStream</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a> channel)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Creates a new ZIP OutputStream writing to a SeekableByteChannel.
- <p><a href="../../../../../../org/apache/commons/compress/utils/SeekableInMemoryByteChannel.html" title="class in org.apache.commons.compress.utils"><code>SeekableInMemoryByteChannel</code></a>
- allows you to write to an in-memory archive using random
- access.</p></div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - the channel to zip to</dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd><dt><span class="strong">Since:</span></dt>
- <dd>1.13</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 boolean <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.336">isSeekable</a>()</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/commons/compress/archivers/zip/ZipArchiveOutputStream.html#STORED"><code>STORED</code></a> entries before
- invoking <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(ArchiveEntry)</code></a>.</div>
- <dl><dt><span class="strong">Returns:</span></dt><dd>true if seekable</dd></dl>
- </li>
- </ul>
- <a name="setEncoding(java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setEncoding</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.349">setEncoding</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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 UTF-8.</p></div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>encoding</code> - the encoding to use for file names, use null
- for the platform's default encoding</dd></dl>
- </li>
- </ul>
- <a name="getEncoding()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>getEncoding</h4>
- <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.362">getEncoding</a>()</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></dl>
- </li>
- </ul>
- <a name="setUseLanguageEncodingFlag(boolean)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setUseLanguageEncodingFlag</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.375">setUseLanguageEncodingFlag</a>(boolean 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>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - whether to set the language encoding flag if the file
- name encoding is UTF-8</dd></dl>
- </li>
- </ul>
- <a name="setCreateUnicodeExtraFields(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream.UnicodeExtraFieldPolicy)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setCreateUnicodeExtraFields</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.386">setCreateUnicodeExtraFields</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveOutputStream.UnicodeExtraFieldPolicy</a> b)</pre>
- <div class="block">Whether to create Unicode Extra Fields.
- <p>Defaults to NEVER.</p></div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - whether to create Unicode Extra Fields.</dd></dl>
- </li>
- </ul>
- <a name="setFallbackToUTF8(boolean)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setFallbackToUTF8</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.400">setFallbackToUTF8</a>(boolean 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>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - whether to fall back to UTF and the language encoding
- flag if the file name cannot be encoded using the specified
- encoding.</dd></dl>
- </li>
- </ul>
- <a name="setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setUseZip64</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.449">setUseZip64</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html" title="enum in org.apache.commons.compress.archivers.zip">Zip64Mode</a> mode)</pre>
- <div class="block">Whether Zip64 extensions will be used.
- <p>When setting the mode to <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Never</code></a>,
- <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)</code></a>, <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#closeArchiveEntry()"><code>closeArchiveEntry()</code></a>, <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#finish()"><code>finish()</code></a> or <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#close()"><code>close()</code></a> may throw a <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip"><code>Zip64RequiredException</code></a> if the entry's size or the total size
- of the archive exceeds 4GB or there are more than 65536 entries
- inside the archive. Any archive created in this mode will be
- readable by implementations that don't support Zip64.</p>
- <p>When setting the mode to <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Always"><code>Always</code></a>,
- Zip64 extensions will be used for all entries. Any archive
- created in this mode may be unreadable by implementations that
- don't support Zip64 even if all its contents would be.</p>
- <p>When setting the mode to <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#AsNeeded"><code>AsNeeded</code></a>, Zip64 extensions will transparently be used for
- those entries that require them. This mode can only be used if
- the uncompressed size of the <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip"><code>ZipArchiveEntry</code></a> is known
- when calling <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)</code></a> or the archive is written
- to a seekable output (i.e. you have used the <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#ZipArchiveOutputStream(java.io.File)"><code>File-arg constructor</code></a>) -
- this mode is not valid when the output stream is not seekable
- and the uncompressed size is unknown when <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)</code></a> is called.</p>
-
- <p>If no entry inside the resulting archive requires Zip64
- extensions then <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Never</code></a> will create the
- smallest archive. <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#AsNeeded"><code>AsNeeded</code></a> will
- create a slightly bigger archive if the uncompressed size of
- any entry has initially been unknown and create an archive
- identical to <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Never</code></a> otherwise. <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Always"><code>Always</code></a> will create an archive that is at
- least 24 bytes per entry bigger than the one <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Never</code></a> would create.</p>
- <p>Defaults to <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#AsNeeded"><code>AsNeeded</code></a> unless
- <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)"><code>putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)</code></a> is called with an entry of unknown
- size and data is written to a non-seekable stream - in this
- case the default is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Never</code></a>.</p></div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>mode</code> - Whether Zip64 extensions will be used.</dd><dt><span class="strong">Since:</span></dt>
- <dd>1.3</dd></dl>
- </li>
- </ul>
- <a name="finish()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>finish</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.460">finish</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Finishes the addition of entries to this stream, without closing it.
- Additional data can be written, if the format supports it.</div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#finish()">finish</a></code> in class <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></code></dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the archive's size exceeds 4
- GByte or there are more than 65535 entries inside the archive
- and <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)"><code>setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)</code></a> is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if the user forgets to close the entry.</dd></dl>
- </li>
- </ul>
- <a name="closeArchiveEntry()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>closeArchiveEntry</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.504">closeArchiveEntry</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Writes all necessary data for this entry.</div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#closeArchiveEntry()">closeArchiveEntry</a></code> in class <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></code></dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the entry's uncompressed or
- compressed size exceeds 4 GByte and <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)"><code>setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)</code></a>
- is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd></dl>
- </li>
- </ul>
- <a name="addRawArchiveEntry(org.apache.commons.compress.archivers.zip.ZipArchiveEntry, java.io.InputStream)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>addRawArchiveEntry</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.572">addRawArchiveEntry</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> entry,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a> rawStream)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Adds an archive entry with a raw input stream.
- If crc, size and compressed size are supplied on the entry, these values will be used as-is.
- Zip64 status is re-established based on the settings in this stream, and the supplied value
- is ignored.
- The entry is put and closed immediately.</div>
- <dl><dt><span class="strong">Parameters:</span></dt><dd><code>entry</code> - The archive entry to add</dd><dd><code>rawStream</code> - The raw input stream of a different entry. May be compressed/encrypted.</dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If copying fails</dd></dl>
- </li>
- </ul>
- <a name="putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>putArchiveEntry</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.724">putArchiveEntry</a>(<a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a> archiveEntry)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Writes the headers for an archive entry to the output stream.
- The caller must then write the content to the stream and call
- <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#closeArchiveEntry()"><code>ArchiveOutputStream.closeArchiveEntry()</code></a> to complete the process.</div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#putArchiveEntry(org.apache.commons.compress.archivers.ArchiveEntry)">putArchiveEntry</a></code> in class <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></code></dd>
- <dt><span class="strong">Parameters:</span></dt><dd><code>archiveEntry</code> - describes the entry</dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if entry is not an instance of ZipArchiveEntry</dd>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the entry's uncompressed or
- compressed size is known to exceed 4 GByte and <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)"><code>setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)</code></a>
- is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</dd></dl>
- </li>
- </ul>
- <a name="setComment(java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setComment</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.856">setComment</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> 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></dl>
- </li>
- </ul>
- <a name="setLevel(int)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setLevel</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.868">setLevel</a>(int 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><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if an invalid compression
- level is specified.</dd></dl>
- </li>
- </ul>
- <a name="setMethod(int)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>setMethod</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.884">setMethod</a>(int 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></dl>
- </li>
- </ul>
- <a name="canWriteEntryData(org.apache.commons.compress.archivers.ArchiveEntry)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>canWriteEntryData</h4>
- <pre>public boolean <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.896">canWriteEntryData</a>(<a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a> ae)</pre>
- <div class="block">Whether this stream is able to write the given entry.
- <p>May return false if it is set up to use encryption or a
- compression method that hasn't been implemented yet.</p></div>
- <dl>
- <dt><strong>Overrides:</strong></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#canWriteEntryData(org.apache.commons.compress.archivers.ArchiveEntry)">canWriteEntryData</a></code> in class <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></code></dd>
- <dt><span class="strong">Parameters:</span></dt><dd><code>ae</code> - the entry to test</dd>
- <dt><span class="strong">Returns:</span></dt><dd>This implementation always returns true.</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 void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.914">write</a>(byte[] b,
- int offset,
- int length)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Writes bytes to ZIP entry.</div>
- <dl>
- <dt><strong>Overrides:</strong></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#write(byte[],%20int,%20int)" title="class or interface in java.io">write</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="close()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>close</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.956">close</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code> in interface <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code> in interface <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
- <dt><strong>Overrides:</strong></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#close()" title="class or interface in java.io">close</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the archive's size exceeds 4
- GByte or there are more than 65535 entries inside the archive
- and <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)"><code>setUseZip64(org.apache.commons.compress.archivers.zip.Zip64Mode)</code></a> is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd></dl>
- </li>
- </ul>
- <a name="flush()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>flush</h4>
- <pre>public void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.970">flush</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true#flush()" title="class or interface in java.io">flush</a></code> in interface <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Flushable.html?is-external=true" title="class or interface in java.io">Flushable</a></code></dd>
- <dt><strong>Overrides:</strong></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true#flush()" title="class or interface in java.io">flush</a></code> in class <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a></code></dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs.</dd></dl>
- </li>
- </ul>
- <a name="deflate()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>deflate</h4>
- <pre>protected final void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1008">deflate</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="writeLocalFileHeader(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeLocalFileHeader</h4>
- <pre>protected void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1017">writeLocalFileHeader</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="writeDataDescriptor(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeDataDescriptor</h4>
- <pre>protected void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1145">writeDataDescriptor</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="writeCentralFileHeader(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeCentralFileHeader</h4>
- <pre>protected void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1168">writeCentralFileHeader</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a> ze)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the archive's size exceeds 4
- GByte and <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html" title="enum in org.apache.commons.compress.archivers.zip"><code>#setUseZip64</code></a> is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd></dl>
- </li>
- </ul>
- <a name="writeCentralDirectoryEnd()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeCentralDirectoryEnd</h4>
- <pre>protected void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1320">writeCentralDirectoryEnd</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Writes the "End of central dir record".</div>
- <dl><dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64RequiredException.html" title="class in org.apache.commons.compress.archivers.zip">Zip64RequiredException</a></code> - if the archive's size exceeds 4
- GByte or there are more than 65535 entries inside the archive
- and <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html" title="enum in org.apache.commons.compress.archivers.zip"><code>#setUseZip64</code></a> is <a href="../../../../../../org/apache/commons/compress/archivers/zip/Zip64Mode.html#Never"><code>Zip64Mode.Never</code></a>.</dd></dl>
- </li>
- </ul>
- <a name="writeZip64CentralDirectory()">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeZip64CentralDirectory</h4>
- <pre>protected void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1361">writeZip64CentralDirectory</a>()
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Writes the "ZIP64 End of central dir record" and
- "ZIP64 End of central dir locator".</div>
- <dl><dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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 void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1428">writeOut</a>(byte[] data)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="writeOut(byte[], int, int)">
- <!-- -->
- </a>
- <ul class="blockList">
- <li class="blockList">
- <h4>writeOut</h4>
- <pre>protected final void <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1440">writeOut</a>(byte[] data,
- int offset,
- int length)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
- </li>
- </ul>
- <a name="createArchiveEntry(java.io.File, java.lang.String)">
- <!-- -->
- </a>
- <ul class="blockListLast">
- <li class="blockList">
- <h4>createArchiveEntry</h4>
- <pre>public <a href="../../../../../../org/apache/commons/compress/archivers/ArchiveEntry.html" title="interface in org.apache.commons.compress.archivers">ArchiveEntry</a> <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html#line.1483">createArchiveEntry</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> inputFile,
- <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> entryName)
- throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
- <div class="block">Creates a new zip entry taking some information from the given
- file and using the provided name.
- <p>The name will be adjusted to end with a forward slash "/" if
- the file is a directory. If the file is not a directory a
- potential trailing forward slash will be stripped from the
- entry name.</p>
- <p>Must not be used if the stream has already been closed.</p></div>
- <dl>
- <dt><strong>Specified by:</strong></dt>
- <dd><code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html#createArchiveEntry(java.io.File,%20java.lang.String)">createArchiveEntry</a></code> in class <code><a href="../../../../../../org/apache/commons/compress/archivers/ArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers">ArchiveOutputStream</a></code></dd>
- <dt><span class="strong">Parameters:</span></dt><dd><code>inputFile</code> - the file to create the entry from</dd><dd><code>entryName</code> - name to use for the entry</dd>
- <dt><span class="strong">Returns:</span></dt><dd>the ArchiveEntry set up with details from the file</dd>
- <dt><span class="strong">Throws:</span></dt>
- <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs</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="class-use/ZipArchiveOutputStream.html">Use</a></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/commons/compress/archivers/zip/ZipArchiveInputStream.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Prev Class</span></a></li>
- <li><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.UnicodeExtraFieldPolicy.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Next Class</span></a></li>
- </ul>
- <ul class="navList">
- <li><a href="../../../../../../index.html?org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html" target="_top">Frames</a></li>
- <li><a href="ZipArchiveOutputStream.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: </li>
- <li><a href="#nested_class_summary">Nested</a> | </li>
- <li><a href="#field_summary">Field</a> | </li>
- <li><a href="#constructor_summary">Constr</a> | </li>
- <li><a href="#method_summary">Method</a></li>
- </ul>
- <ul class="subNavList">
- <li>Detail: </li>
- <li><a href="#field_detail">Field</a> | </li>
- <li><a href="#constructor_detail">Constr</a> | </li>
- <li><a href="#method_detail">Method</a></li>
- </ul>
- </div>
- <a name="skip-navbar_bottom">
- <!-- -->
- </a></div>
- <!-- ======== END OF BOTTOM NAVBAR ======= -->
- <p class="legalCopy"><small>Copyright © 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
- </body>
- </html>
|