1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
---|
2 | <!--NewPage-->
|
---|
3 | <HTML>
|
---|
4 | <HEAD>
|
---|
5 | <!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:36 NZST 2007 -->
|
---|
6 | <TITLE>
|
---|
7 | ZipOutputStream (Apache Ant API)
|
---|
8 | </TITLE>
|
---|
9 |
|
---|
10 | <META NAME="keywords" CONTENT="org.apache.tools.zip.ZipOutputStream class">
|
---|
11 |
|
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
|
---|
13 |
|
---|
14 | <SCRIPT type="text/javascript">
|
---|
15 | function windowTitle()
|
---|
16 | {
|
---|
17 | parent.document.title="ZipOutputStream (Apache Ant API)";
|
---|
18 | }
|
---|
19 | </SCRIPT>
|
---|
20 |
|
---|
21 | </HEAD>
|
---|
22 |
|
---|
23 | <BODY BGCOLOR="white" onload="windowTitle();">
|
---|
24 |
|
---|
25 |
|
---|
26 | <!-- ========= START OF TOP NAVBAR ======= -->
|
---|
27 | <A NAME="navbar_top"><!-- --></A>
|
---|
28 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
---|
29 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
30 | <TR>
|
---|
31 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
32 | <A NAME="navbar_top_firstrow"><!-- --></A>
|
---|
33 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
34 | <TR ALIGN="center" VALIGN="top">
|
---|
35 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
36 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
37 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
38 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
39 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
42 | </TR>
|
---|
43 | </TABLE>
|
---|
44 | </TD>
|
---|
45 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
46 | </EM>
|
---|
47 | </TD>
|
---|
48 | </TR>
|
---|
49 |
|
---|
50 | <TR>
|
---|
51 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
52 | <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip"><B>PREV CLASS</B></A>
|
---|
53 | <A HREF="../../../../org/apache/tools/zip/ZipShort.html" title="class in org.apache.tools.zip"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
54 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
55 | <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
56 | <A HREF="ZipOutputStream.html" target="_top"><B>NO FRAMES</B></A>
|
---|
57 | <SCRIPT type="text/javascript">
|
---|
58 | <!--
|
---|
59 | if(window==top) {
|
---|
60 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
61 | }
|
---|
62 | //-->
|
---|
63 | </SCRIPT>
|
---|
64 | <NOSCRIPT>
|
---|
65 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
66 | </NOSCRIPT>
|
---|
67 |
|
---|
68 | </FONT></TD>
|
---|
69 | </TR>
|
---|
70 | <TR>
|
---|
71 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
72 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
73 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
74 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
75 | </TR>
|
---|
76 | </TABLE>
|
---|
77 | <A NAME="skip-navbar_top"></A>
|
---|
78 | <!-- ========= END OF TOP NAVBAR ========= -->
|
---|
79 |
|
---|
80 | <HR>
|
---|
81 | <!-- ======== START OF CLASS DATA ======== -->
|
---|
82 | <H2>
|
---|
83 | <FONT SIZE="-1">
|
---|
84 | org.apache.tools.zip</FONT>
|
---|
85 | <BR>
|
---|
86 | Class ZipOutputStream</H2>
|
---|
87 | <PRE>
|
---|
88 | java.lang.Object
|
---|
89 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.io.OutputStream
|
---|
90 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by">java.io.FilterOutputStream
|
---|
91 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.zip.ZipOutputStream</B>
|
---|
92 | </PRE>
|
---|
93 | <HR>
|
---|
94 | <DL>
|
---|
95 | <DT>public class <B>ZipOutputStream</B><DT>extends java.io.FilterOutputStream</DL>
|
---|
96 |
|
---|
97 | <P>
|
---|
98 | Reimplementation of <CODE>java.util.zip.ZipOutputStream</CODE> that does handle the extended
|
---|
99 | functionality of this package, especially internal/external file
|
---|
100 | attributes and extra fields with different layouts for local file
|
---|
101 | data and central directory entries.
|
---|
102 |
|
---|
103 | <p>This class will try to use <CODE>RandomAccessFile</CODE> when you know that the output is going to go to a
|
---|
104 | file.</p>
|
---|
105 |
|
---|
106 | <p>If RandomAccessFile cannot be used, this implementation will use
|
---|
107 | 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
|
---|
108 | calculate them yourself. Unfortunately this is not possible for
|
---|
109 | the <A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED"><CODE>STORED</CODE></A> method, here setting the CRC and
|
---|
110 | 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>
|
---|
111 | <P>
|
---|
112 |
|
---|
113 | <P>
|
---|
114 | <HR>
|
---|
115 |
|
---|
116 | <P>
|
---|
117 | <!-- ======== NESTED CLASS SUMMARY ======== -->
|
---|
118 |
|
---|
119 |
|
---|
120 | <!-- =========== FIELD SUMMARY =========== -->
|
---|
121 |
|
---|
122 | <A NAME="field_summary"><!-- --></A>
|
---|
123 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
124 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
125 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
126 | <B>Field Summary</B></FONT></TD>
|
---|
127 | </TR>
|
---|
128 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
129 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
130 | <CODE>protected byte[]</CODE></FONT></TD>
|
---|
131 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#buf">buf</A></B></CODE>
|
---|
132 |
|
---|
133 | <BR>
|
---|
134 | This buffer servers as a Deflater.</TD>
|
---|
135 | </TR>
|
---|
136 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
137 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
138 | <CODE>protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A></CODE></FONT></TD>
|
---|
139 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#CFH_SIG">CFH_SIG</A></B></CODE>
|
---|
140 |
|
---|
141 | <BR>
|
---|
142 | central file header signature</TD>
|
---|
143 | </TR>
|
---|
144 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
145 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
146 | <CODE>protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A></CODE></FONT></TD>
|
---|
147 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#DD_SIG">DD_SIG</A></B></CODE>
|
---|
148 |
|
---|
149 | <BR>
|
---|
150 | data descriptor signature</TD>
|
---|
151 | </TR>
|
---|
152 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
153 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
154 | <CODE>protected java.util.zip.Deflater</CODE></FONT></TD>
|
---|
155 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#def">def</A></B></CODE>
|
---|
156 |
|
---|
157 | <BR>
|
---|
158 | This Deflater object is used for output.</TD>
|
---|
159 | </TR>
|
---|
160 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
161 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
162 | <CODE>static int</CODE></FONT></TD>
|
---|
163 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#DEFLATED">DEFLATED</A></B></CODE>
|
---|
164 |
|
---|
165 | <BR>
|
---|
166 | Compression method for deflated entries.</TD>
|
---|
167 | </TR>
|
---|
168 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
169 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
170 | <CODE>protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A></CODE></FONT></TD>
|
---|
171 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#EOCD_SIG">EOCD_SIG</A></B></CODE>
|
---|
172 |
|
---|
173 | <BR>
|
---|
174 | end of central dir signature</TD>
|
---|
175 | </TR>
|
---|
176 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
177 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
178 | <CODE>protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A></CODE></FONT></TD>
|
---|
179 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#LFH_SIG">LFH_SIG</A></B></CODE>
|
---|
180 |
|
---|
181 | <BR>
|
---|
182 | local file header signature</TD>
|
---|
183 | </TR>
|
---|
184 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
185 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
186 | <CODE>static int</CODE></FONT></TD>
|
---|
187 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED">STORED</A></B></CODE>
|
---|
188 |
|
---|
189 | <BR>
|
---|
190 | Compression method for deflated entries.</TD>
|
---|
191 | </TR>
|
---|
192 | </TABLE>
|
---|
193 | <A NAME="fields_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
|
---|
194 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
195 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
196 | <TD><B>Fields inherited from class java.io.FilterOutputStream</B></TD>
|
---|
197 | </TR>
|
---|
198 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
199 | <TD><CODE>out</CODE></TD>
|
---|
200 | </TR>
|
---|
201 | </TABLE>
|
---|
202 |
|
---|
203 | <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
---|
204 |
|
---|
205 | <A NAME="constructor_summary"><!-- --></A>
|
---|
206 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
207 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
208 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
209 | <B>Constructor Summary</B></FONT></TD>
|
---|
210 | </TR>
|
---|
211 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
212 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#ZipOutputStream(java.io.File)">ZipOutputStream</A></B>(java.io.File file)</CODE>
|
---|
213 |
|
---|
214 | <BR>
|
---|
215 | Creates a new ZIP OutputStream writing to a File.</TD>
|
---|
216 | </TR>
|
---|
217 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
218 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#ZipOutputStream(java.io.OutputStream)">ZipOutputStream</A></B>(java.io.OutputStream out)</CODE>
|
---|
219 |
|
---|
220 | <BR>
|
---|
221 | Creates a new ZIP OutputStream filtering the underlying stream.</TD>
|
---|
222 | </TR>
|
---|
223 | </TABLE>
|
---|
224 |
|
---|
225 | <!-- ========== METHOD SUMMARY =========== -->
|
---|
226 |
|
---|
227 | <A NAME="method_summary"><!-- --></A>
|
---|
228 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
229 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
230 | <TD COLSPAN=2><FONT SIZE="+2">
|
---|
231 | <B>Method Summary</B></FONT></TD>
|
---|
232 | </TR>
|
---|
233 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
234 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
235 | <CODE>protected static long</CODE></FONT></TD>
|
---|
236 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#adjustToLong(int)">adjustToLong</A></B>(int i)</CODE>
|
---|
237 |
|
---|
238 | <BR>
|
---|
239 | Assumes a negative integer really is a positive integer that
|
---|
240 | has wrapped around and re-creates the original value.</TD>
|
---|
241 | </TR>
|
---|
242 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
243 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
244 | <CODE> void</CODE></FONT></TD>
|
---|
245 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#close()">close</A></B>()</CODE>
|
---|
246 |
|
---|
247 | <BR>
|
---|
248 | Closes this output stream and releases any system resources
|
---|
249 | associated with the stream.</TD>
|
---|
250 | </TR>
|
---|
251 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
252 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
253 | <CODE> void</CODE></FONT></TD>
|
---|
254 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#closeEntry()">closeEntry</A></B>()</CODE>
|
---|
255 |
|
---|
256 | <BR>
|
---|
257 | Writes all necessary data for this entry.</TD>
|
---|
258 | </TR>
|
---|
259 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
260 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
261 | <CODE>protected void</CODE></FONT></TD>
|
---|
262 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#deflate()">deflate</A></B>()</CODE>
|
---|
263 |
|
---|
264 | <BR>
|
---|
265 | Writes next block of compressed data to the output stream.</TD>
|
---|
266 | </TR>
|
---|
267 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
268 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
269 | <CODE> void</CODE></FONT></TD>
|
---|
270 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#finish()">finish</A></B>()</CODE>
|
---|
271 |
|
---|
272 | <BR>
|
---|
273 | Finishs writing the contents and closes this as well as the
|
---|
274 | underlying stream.</TD>
|
---|
275 | </TR>
|
---|
276 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
277 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
278 | <CODE> void</CODE></FONT></TD>
|
---|
279 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#flush()">flush</A></B>()</CODE>
|
---|
280 |
|
---|
281 | <BR>
|
---|
282 | Flushes this output stream and forces any buffered output bytes
|
---|
283 | to be written out to the stream.</TD>
|
---|
284 | </TR>
|
---|
285 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
286 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
287 | <CODE>protected byte[]</CODE></FONT></TD>
|
---|
288 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#getBytes(java.lang.String)">getBytes</A></B>(java.lang.String name)</CODE>
|
---|
289 |
|
---|
290 | <BR>
|
---|
291 | Retrieve the bytes for the given String in the encoding set for
|
---|
292 | this Stream.</TD>
|
---|
293 | </TR>
|
---|
294 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
295 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
296 | <CODE> java.lang.String</CODE></FONT></TD>
|
---|
297 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#getEncoding()">getEncoding</A></B>()</CODE>
|
---|
298 |
|
---|
299 | <BR>
|
---|
300 | The encoding to use for filenames and the file comment.</TD>
|
---|
301 | </TR>
|
---|
302 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
303 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
304 | <CODE> boolean</CODE></FONT></TD>
|
---|
305 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#isSeekable()">isSeekable</A></B>()</CODE>
|
---|
306 |
|
---|
307 | <BR>
|
---|
308 | This method indicates whether this archive is writing to a seekable stream (i.e., to a random
|
---|
309 | access file).</TD>
|
---|
310 | </TR>
|
---|
311 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
312 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
313 | <CODE> void</CODE></FONT></TD>
|
---|
314 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#putNextEntry(org.apache.tools.zip.ZipEntry)">putNextEntry</A></B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)</CODE>
|
---|
315 |
|
---|
316 | <BR>
|
---|
317 | Begin writing next entry.</TD>
|
---|
318 | </TR>
|
---|
319 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
320 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
321 | <CODE> void</CODE></FONT></TD>
|
---|
322 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#setComment(java.lang.String)">setComment</A></B>(java.lang.String comment)</CODE>
|
---|
323 |
|
---|
324 | <BR>
|
---|
325 | Set the file comment.</TD>
|
---|
326 | </TR>
|
---|
327 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
328 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
329 | <CODE> void</CODE></FONT></TD>
|
---|
330 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#setEncoding(java.lang.String)">setEncoding</A></B>(java.lang.String encoding)</CODE>
|
---|
331 |
|
---|
332 | <BR>
|
---|
333 | The encoding to use for filenames and the file comment.</TD>
|
---|
334 | </TR>
|
---|
335 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
336 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
337 | <CODE> void</CODE></FONT></TD>
|
---|
338 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#setLevel(int)">setLevel</A></B>(int level)</CODE>
|
---|
339 |
|
---|
340 | <BR>
|
---|
341 | Sets the compression level for subsequent entries.</TD>
|
---|
342 | </TR>
|
---|
343 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
344 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
345 | <CODE> void</CODE></FONT></TD>
|
---|
346 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#setMethod(int)">setMethod</A></B>(int method)</CODE>
|
---|
347 |
|
---|
348 | <BR>
|
---|
349 | Sets the default compression method for subsequent entries.</TD>
|
---|
350 | </TR>
|
---|
351 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
352 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
353 | <CODE>protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A></CODE></FONT></TD>
|
---|
354 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#toDosTime(java.util.Date)">toDosTime</A></B>(java.util.Date time)</CODE>
|
---|
355 |
|
---|
356 | <BR>
|
---|
357 | Convert a Date object to a DOS date/time field.</TD>
|
---|
358 | </TR>
|
---|
359 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
360 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
361 | <CODE> void</CODE></FONT></TD>
|
---|
362 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#write(byte[], int, int)">write</A></B>(byte[] b,
|
---|
363 | int offset,
|
---|
364 | int length)</CODE>
|
---|
365 |
|
---|
366 | <BR>
|
---|
367 | Writes bytes to ZIP entry.</TD>
|
---|
368 | </TR>
|
---|
369 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
370 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
371 | <CODE> void</CODE></FONT></TD>
|
---|
372 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#write(int)">write</A></B>(int b)</CODE>
|
---|
373 |
|
---|
374 | <BR>
|
---|
375 | Writes a single byte to ZIP entry.</TD>
|
---|
376 | </TR>
|
---|
377 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
378 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
379 | <CODE>protected void</CODE></FONT></TD>
|
---|
380 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeCentralDirectoryEnd()">writeCentralDirectoryEnd</A></B>()</CODE>
|
---|
381 |
|
---|
382 | <BR>
|
---|
383 | Writes the "End of central dir record"</TD>
|
---|
384 | </TR>
|
---|
385 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
386 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
387 | <CODE>protected void</CODE></FONT></TD>
|
---|
388 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeCentralFileHeader(org.apache.tools.zip.ZipEntry)">writeCentralFileHeader</A></B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)</CODE>
|
---|
389 |
|
---|
390 | <BR>
|
---|
391 | Writes the central file header entry</TD>
|
---|
392 | </TR>
|
---|
393 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
394 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
395 | <CODE>protected void</CODE></FONT></TD>
|
---|
396 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeDataDescriptor(org.apache.tools.zip.ZipEntry)">writeDataDescriptor</A></B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)</CODE>
|
---|
397 |
|
---|
398 | <BR>
|
---|
399 | Writes the data descriptor entry</TD>
|
---|
400 | </TR>
|
---|
401 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
402 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
403 | <CODE>protected void</CODE></FONT></TD>
|
---|
404 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeLocalFileHeader(org.apache.tools.zip.ZipEntry)">writeLocalFileHeader</A></B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)</CODE>
|
---|
405 |
|
---|
406 | <BR>
|
---|
407 | Writes the local file header entry</TD>
|
---|
408 | </TR>
|
---|
409 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
410 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
411 | <CODE>protected void</CODE></FONT></TD>
|
---|
412 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeOut(byte[])">writeOut</A></B>(byte[] data)</CODE>
|
---|
413 |
|
---|
414 | <BR>
|
---|
415 | Write bytes to output or random access file</TD>
|
---|
416 | </TR>
|
---|
417 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
418 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
---|
419 | <CODE>protected void</CODE></FONT></TD>
|
---|
420 | <TD><CODE><B><A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#writeOut(byte[], int, int)">writeOut</A></B>(byte[] data,
|
---|
421 | int offset,
|
---|
422 | int length)</CODE>
|
---|
423 |
|
---|
424 | <BR>
|
---|
425 | Write bytes to output or random access file</TD>
|
---|
426 | </TR>
|
---|
427 | </TABLE>
|
---|
428 | <A NAME="methods_inherited_from_class_java.io.FilterOutputStream"><!-- --></A>
|
---|
429 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
430 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
431 | <TD><B>Methods inherited from class java.io.FilterOutputStream</B></TD>
|
---|
432 | </TR>
|
---|
433 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
434 | <TD><CODE>write</CODE></TD>
|
---|
435 | </TR>
|
---|
436 | </TABLE>
|
---|
437 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
---|
438 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
439 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
---|
440 | <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
---|
441 | </TR>
|
---|
442 | <TR BGCOLOR="white" CLASS="TableRowColor">
|
---|
443 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
|
---|
444 | </TR>
|
---|
445 | </TABLE>
|
---|
446 |
|
---|
447 | <P>
|
---|
448 |
|
---|
449 | <!-- ============ FIELD DETAIL =========== -->
|
---|
450 |
|
---|
451 | <A NAME="field_detail"><!-- --></A>
|
---|
452 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
453 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
454 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
455 | <B>Field Detail</B></FONT></TD>
|
---|
456 | </TR>
|
---|
457 | </TABLE>
|
---|
458 |
|
---|
459 | <A NAME="def"><!-- --></A><H3>
|
---|
460 | def</H3>
|
---|
461 | <PRE>
|
---|
462 | protected java.util.zip.Deflater <B>def</B></PRE>
|
---|
463 | <DL>
|
---|
464 | <DD>This Deflater object is used for output.
|
---|
465 |
|
---|
466 | <p>This attribute is only protected to provide a level of API
|
---|
467 | backwards compatibility. This class used to extend <CODE>DeflaterOutputStream</CODE> up to
|
---|
468 | Revision 1.13.</p>
|
---|
469 | <P>
|
---|
470 | <DL>
|
---|
471 | <DT><B>Since:</B></DT>
|
---|
472 | <DD>1.14</DD>
|
---|
473 | </DL>
|
---|
474 | </DL>
|
---|
475 | <HR>
|
---|
476 |
|
---|
477 | <A NAME="buf"><!-- --></A><H3>
|
---|
478 | buf</H3>
|
---|
479 | <PRE>
|
---|
480 | protected byte[] <B>buf</B></PRE>
|
---|
481 | <DL>
|
---|
482 | <DD>This buffer servers as a Deflater.
|
---|
483 |
|
---|
484 | <p>This attribute is only protected to provide a level of API
|
---|
485 | backwards compatibility. This class used to extend <CODE>DeflaterOutputStream</CODE> up to
|
---|
486 | Revision 1.13.</p>
|
---|
487 | <P>
|
---|
488 | <DL>
|
---|
489 | <DT><B>Since:</B></DT>
|
---|
490 | <DD>1.14</DD>
|
---|
491 | </DL>
|
---|
492 | </DL>
|
---|
493 | <HR>
|
---|
494 |
|
---|
495 | <A NAME="DEFLATED"><!-- --></A><H3>
|
---|
496 | DEFLATED</H3>
|
---|
497 | <PRE>
|
---|
498 | public static final int <B>DEFLATED</B></PRE>
|
---|
499 | <DL>
|
---|
500 | <DD>Compression method for deflated entries.
|
---|
501 | <P>
|
---|
502 | <DL>
|
---|
503 | <DT><B>Since:</B></DT>
|
---|
504 | <DD>1.1</DD>
|
---|
505 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.DEFLATED">Constant Field Values</A></DL>
|
---|
506 | </DL>
|
---|
507 | <HR>
|
---|
508 |
|
---|
509 | <A NAME="STORED"><!-- --></A><H3>
|
---|
510 | STORED</H3>
|
---|
511 | <PRE>
|
---|
512 | public static final int <B>STORED</B></PRE>
|
---|
513 | <DL>
|
---|
514 | <DD>Compression method for deflated entries.
|
---|
515 | <P>
|
---|
516 | <DL>
|
---|
517 | <DT><B>Since:</B></DT>
|
---|
518 | <DD>1.1</DD>
|
---|
519 | <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.zip.ZipOutputStream.STORED">Constant Field Values</A></DL>
|
---|
520 | </DL>
|
---|
521 | <HR>
|
---|
522 |
|
---|
523 | <A NAME="LFH_SIG"><!-- --></A><H3>
|
---|
524 | LFH_SIG</H3>
|
---|
525 | <PRE>
|
---|
526 | protected static final <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A> <B>LFH_SIG</B></PRE>
|
---|
527 | <DL>
|
---|
528 | <DD>local file header signature
|
---|
529 | <P>
|
---|
530 | <DL>
|
---|
531 | <DT><B>Since:</B></DT>
|
---|
532 | <DD>1.1</DD>
|
---|
533 | </DL>
|
---|
534 | </DL>
|
---|
535 | <HR>
|
---|
536 |
|
---|
537 | <A NAME="DD_SIG"><!-- --></A><H3>
|
---|
538 | DD_SIG</H3>
|
---|
539 | <PRE>
|
---|
540 | protected static final <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A> <B>DD_SIG</B></PRE>
|
---|
541 | <DL>
|
---|
542 | <DD>data descriptor signature
|
---|
543 | <P>
|
---|
544 | <DL>
|
---|
545 | <DT><B>Since:</B></DT>
|
---|
546 | <DD>1.1</DD>
|
---|
547 | </DL>
|
---|
548 | </DL>
|
---|
549 | <HR>
|
---|
550 |
|
---|
551 | <A NAME="CFH_SIG"><!-- --></A><H3>
|
---|
552 | CFH_SIG</H3>
|
---|
553 | <PRE>
|
---|
554 | protected static final <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A> <B>CFH_SIG</B></PRE>
|
---|
555 | <DL>
|
---|
556 | <DD>central file header signature
|
---|
557 | <P>
|
---|
558 | <DL>
|
---|
559 | <DT><B>Since:</B></DT>
|
---|
560 | <DD>1.1</DD>
|
---|
561 | </DL>
|
---|
562 | </DL>
|
---|
563 | <HR>
|
---|
564 |
|
---|
565 | <A NAME="EOCD_SIG"><!-- --></A><H3>
|
---|
566 | EOCD_SIG</H3>
|
---|
567 | <PRE>
|
---|
568 | protected static final <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A> <B>EOCD_SIG</B></PRE>
|
---|
569 | <DL>
|
---|
570 | <DD>end of central dir signature
|
---|
571 | <P>
|
---|
572 | <DL>
|
---|
573 | <DT><B>Since:</B></DT>
|
---|
574 | <DD>1.1</DD>
|
---|
575 | </DL>
|
---|
576 | </DL>
|
---|
577 |
|
---|
578 | <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
---|
579 |
|
---|
580 | <A NAME="constructor_detail"><!-- --></A>
|
---|
581 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
582 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
583 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
584 | <B>Constructor Detail</B></FONT></TD>
|
---|
585 | </TR>
|
---|
586 | </TABLE>
|
---|
587 |
|
---|
588 | <A NAME="ZipOutputStream(java.io.OutputStream)"><!-- --></A><H3>
|
---|
589 | ZipOutputStream</H3>
|
---|
590 | <PRE>
|
---|
591 | public <B>ZipOutputStream</B>(java.io.OutputStream out)</PRE>
|
---|
592 | <DL>
|
---|
593 | <DD>Creates a new ZIP OutputStream filtering the underlying stream.
|
---|
594 | <P>
|
---|
595 | <DT><B>Since:</B></DT>
|
---|
596 | <DD>1.1</DD>
|
---|
597 | </DL>
|
---|
598 | <HR>
|
---|
599 |
|
---|
600 | <A NAME="ZipOutputStream(java.io.File)"><!-- --></A><H3>
|
---|
601 | ZipOutputStream</H3>
|
---|
602 | <PRE>
|
---|
603 | public <B>ZipOutputStream</B>(java.io.File file)
|
---|
604 | throws java.io.IOException</PRE>
|
---|
605 | <DL>
|
---|
606 | <DD>Creates a new ZIP OutputStream writing to a File. Will use
|
---|
607 | random access if possible.
|
---|
608 | <P>
|
---|
609 | <DT><B>Since:</B></DT>
|
---|
610 | <DD>1.14</DD>
|
---|
611 | </DL>
|
---|
612 |
|
---|
613 | <!-- ============ METHOD DETAIL ========== -->
|
---|
614 |
|
---|
615 | <A NAME="method_detail"><!-- --></A>
|
---|
616 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
---|
617 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
---|
618 | <TD COLSPAN=1><FONT SIZE="+2">
|
---|
619 | <B>Method Detail</B></FONT></TD>
|
---|
620 | </TR>
|
---|
621 | </TABLE>
|
---|
622 |
|
---|
623 | <A NAME="isSeekable()"><!-- --></A><H3>
|
---|
624 | isSeekable</H3>
|
---|
625 | <PRE>
|
---|
626 | public boolean <B>isSeekable</B>()</PRE>
|
---|
627 | <DL>
|
---|
628 | <DD>This method indicates whether this archive is writing to a seekable stream (i.e., to a random
|
---|
629 | access file).
|
---|
630 |
|
---|
631 | <p>For seekable streams, you don't need to calculate the CRC or
|
---|
632 | uncompressed size for <A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#STORED"><CODE>STORED</CODE></A> entries before
|
---|
633 | invoking <A HREF="../../../../org/apache/tools/zip/ZipOutputStream.html#putNextEntry(org.apache.tools.zip.ZipEntry)"><CODE>putNextEntry(org.apache.tools.zip.ZipEntry)</CODE></A>.
|
---|
634 | <P>
|
---|
635 | <DD><DL>
|
---|
636 | <DT><B>Since:</B></DT>
|
---|
637 | <DD>1.17</DD>
|
---|
638 | </DL>
|
---|
639 | </DD>
|
---|
640 | </DL>
|
---|
641 | <HR>
|
---|
642 |
|
---|
643 | <A NAME="setEncoding(java.lang.String)"><!-- --></A><H3>
|
---|
644 | setEncoding</H3>
|
---|
645 | <PRE>
|
---|
646 | public void <B>setEncoding</B>(java.lang.String encoding)</PRE>
|
---|
647 | <DL>
|
---|
648 | <DD>The encoding to use for filenames and the file comment.
|
---|
649 |
|
---|
650 | <p>For a list of possible values see <a
|
---|
651 | href="http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html">http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html</a>.
|
---|
652 | Defaults to the platform's default character encoding.</p>
|
---|
653 | <P>
|
---|
654 | <DD><DL>
|
---|
655 | <DT><B>Since:</B></DT>
|
---|
656 | <DD>1.3</DD>
|
---|
657 | </DL>
|
---|
658 | </DD>
|
---|
659 | </DL>
|
---|
660 | <HR>
|
---|
661 |
|
---|
662 | <A NAME="getEncoding()"><!-- --></A><H3>
|
---|
663 | getEncoding</H3>
|
---|
664 | <PRE>
|
---|
665 | public java.lang.String <B>getEncoding</B>()</PRE>
|
---|
666 | <DL>
|
---|
667 | <DD>The encoding to use for filenames and the file comment.
|
---|
668 | <P>
|
---|
669 | <DD><DL>
|
---|
670 |
|
---|
671 | <DT><B>Returns:</B><DD>null if using the platform's default character encoding.<DT><B>Since:</B></DT>
|
---|
672 | <DD>1.3</DD>
|
---|
673 | </DL>
|
---|
674 | </DD>
|
---|
675 | </DL>
|
---|
676 | <HR>
|
---|
677 |
|
---|
678 | <A NAME="finish()"><!-- --></A><H3>
|
---|
679 | finish</H3>
|
---|
680 | <PRE>
|
---|
681 | public void <B>finish</B>()
|
---|
682 | throws java.io.IOException</PRE>
|
---|
683 | <DL>
|
---|
684 | <DD>Finishs writing the contents and closes this as well as the
|
---|
685 | underlying stream.
|
---|
686 | <P>
|
---|
687 | <DD><DL>
|
---|
688 |
|
---|
689 | <DT><B>Throws:</B>
|
---|
690 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
691 | <DD>1.1</DD>
|
---|
692 | </DL>
|
---|
693 | </DD>
|
---|
694 | </DL>
|
---|
695 | <HR>
|
---|
696 |
|
---|
697 | <A NAME="closeEntry()"><!-- --></A><H3>
|
---|
698 | closeEntry</H3>
|
---|
699 | <PRE>
|
---|
700 | public void <B>closeEntry</B>()
|
---|
701 | throws java.io.IOException</PRE>
|
---|
702 | <DL>
|
---|
703 | <DD>Writes all necessary data for this entry.
|
---|
704 | <P>
|
---|
705 | <DD><DL>
|
---|
706 |
|
---|
707 | <DT><B>Throws:</B>
|
---|
708 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
709 | <DD>1.1</DD>
|
---|
710 | </DL>
|
---|
711 | </DD>
|
---|
712 | </DL>
|
---|
713 | <HR>
|
---|
714 |
|
---|
715 | <A NAME="putNextEntry(org.apache.tools.zip.ZipEntry)"><!-- --></A><H3>
|
---|
716 | putNextEntry</H3>
|
---|
717 | <PRE>
|
---|
718 | public void <B>putNextEntry</B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)
|
---|
719 | throws java.io.IOException</PRE>
|
---|
720 | <DL>
|
---|
721 | <DD>Begin writing next entry.
|
---|
722 | <P>
|
---|
723 | <DD><DL>
|
---|
724 |
|
---|
725 | <DT><B>Throws:</B>
|
---|
726 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
727 | <DD>1.1</DD>
|
---|
728 | </DL>
|
---|
729 | </DD>
|
---|
730 | </DL>
|
---|
731 | <HR>
|
---|
732 |
|
---|
733 | <A NAME="setComment(java.lang.String)"><!-- --></A><H3>
|
---|
734 | setComment</H3>
|
---|
735 | <PRE>
|
---|
736 | public void <B>setComment</B>(java.lang.String comment)</PRE>
|
---|
737 | <DL>
|
---|
738 | <DD>Set the file comment.
|
---|
739 | <P>
|
---|
740 | <DD><DL>
|
---|
741 | <DT><B>Since:</B></DT>
|
---|
742 | <DD>1.1</DD>
|
---|
743 | </DL>
|
---|
744 | </DD>
|
---|
745 | </DL>
|
---|
746 | <HR>
|
---|
747 |
|
---|
748 | <A NAME="setLevel(int)"><!-- --></A><H3>
|
---|
749 | setLevel</H3>
|
---|
750 | <PRE>
|
---|
751 | public void <B>setLevel</B>(int level)</PRE>
|
---|
752 | <DL>
|
---|
753 | <DD>Sets the compression level for subsequent entries.
|
---|
754 |
|
---|
755 | <p>Default is Deflater.DEFAULT_COMPRESSION.</p>
|
---|
756 | <P>
|
---|
757 | <DD><DL>
|
---|
758 | <DT><B>Since:</B></DT>
|
---|
759 | <DD>1.1</DD>
|
---|
760 | </DL>
|
---|
761 | </DD>
|
---|
762 | </DL>
|
---|
763 | <HR>
|
---|
764 |
|
---|
765 | <A NAME="setMethod(int)"><!-- --></A><H3>
|
---|
766 | setMethod</H3>
|
---|
767 | <PRE>
|
---|
768 | public void <B>setMethod</B>(int method)</PRE>
|
---|
769 | <DL>
|
---|
770 | <DD>Sets the default compression method for subsequent entries.
|
---|
771 |
|
---|
772 | <p>Default is DEFLATED.</p>
|
---|
773 | <P>
|
---|
774 | <DD><DL>
|
---|
775 | <DT><B>Since:</B></DT>
|
---|
776 | <DD>1.1</DD>
|
---|
777 | </DL>
|
---|
778 | </DD>
|
---|
779 | </DL>
|
---|
780 | <HR>
|
---|
781 |
|
---|
782 | <A NAME="write(byte[], int, int)"><!-- --></A><H3>
|
---|
783 | write</H3>
|
---|
784 | <PRE>
|
---|
785 | public void <B>write</B>(byte[] b,
|
---|
786 | int offset,
|
---|
787 | int length)
|
---|
788 | throws java.io.IOException</PRE>
|
---|
789 | <DL>
|
---|
790 | <DD>Writes bytes to ZIP entry.
|
---|
791 | <P>
|
---|
792 | <DD><DL>
|
---|
793 |
|
---|
794 | <DT><B>Throws:</B>
|
---|
795 | <DD><CODE>java.io.IOException</CODE></DL>
|
---|
796 | </DD>
|
---|
797 | </DL>
|
---|
798 | <HR>
|
---|
799 |
|
---|
800 | <A NAME="write(int)"><!-- --></A><H3>
|
---|
801 | write</H3>
|
---|
802 | <PRE>
|
---|
803 | public void <B>write</B>(int b)
|
---|
804 | throws java.io.IOException</PRE>
|
---|
805 | <DL>
|
---|
806 | <DD>Writes a single byte to ZIP entry.
|
---|
807 |
|
---|
808 | <p>Delegates to the three arg method.</p>
|
---|
809 | <P>
|
---|
810 | <DD><DL>
|
---|
811 |
|
---|
812 | <DT><B>Throws:</B>
|
---|
813 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
814 | <DD>1.14</DD>
|
---|
815 | </DL>
|
---|
816 | </DD>
|
---|
817 | </DL>
|
---|
818 | <HR>
|
---|
819 |
|
---|
820 | <A NAME="close()"><!-- --></A><H3>
|
---|
821 | close</H3>
|
---|
822 | <PRE>
|
---|
823 | public void <B>close</B>()
|
---|
824 | throws java.io.IOException</PRE>
|
---|
825 | <DL>
|
---|
826 | <DD>Closes this output stream and releases any system resources
|
---|
827 | associated with the stream.
|
---|
828 | <P>
|
---|
829 | <DD><DL>
|
---|
830 |
|
---|
831 | <DT><B>Throws:</B>
|
---|
832 | <DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>Since:</B></DT>
|
---|
833 | <DD>1.14</DD>
|
---|
834 | </DL>
|
---|
835 | </DD>
|
---|
836 | </DL>
|
---|
837 | <HR>
|
---|
838 |
|
---|
839 | <A NAME="flush()"><!-- --></A><H3>
|
---|
840 | flush</H3>
|
---|
841 | <PRE>
|
---|
842 | public void <B>flush</B>()
|
---|
843 | throws java.io.IOException</PRE>
|
---|
844 | <DL>
|
---|
845 | <DD>Flushes this output stream and forces any buffered output bytes
|
---|
846 | to be written out to the stream.
|
---|
847 | <P>
|
---|
848 | <DD><DL>
|
---|
849 |
|
---|
850 | <DT><B>Throws:</B>
|
---|
851 | <DD><CODE>java.io.IOException</CODE> - if an I/O error occurs.<DT><B>Since:</B></DT>
|
---|
852 | <DD>1.14</DD>
|
---|
853 | </DL>
|
---|
854 | </DD>
|
---|
855 | </DL>
|
---|
856 | <HR>
|
---|
857 |
|
---|
858 | <A NAME="deflate()"><!-- --></A><H3>
|
---|
859 | deflate</H3>
|
---|
860 | <PRE>
|
---|
861 | protected final void <B>deflate</B>()
|
---|
862 | throws java.io.IOException</PRE>
|
---|
863 | <DL>
|
---|
864 | <DD>Writes next block of compressed data to the output stream.
|
---|
865 | <P>
|
---|
866 | <DD><DL>
|
---|
867 |
|
---|
868 | <DT><B>Throws:</B>
|
---|
869 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
870 | <DD>1.14</DD>
|
---|
871 | </DL>
|
---|
872 | </DD>
|
---|
873 | </DL>
|
---|
874 | <HR>
|
---|
875 |
|
---|
876 | <A NAME="writeLocalFileHeader(org.apache.tools.zip.ZipEntry)"><!-- --></A><H3>
|
---|
877 | writeLocalFileHeader</H3>
|
---|
878 | <PRE>
|
---|
879 | protected void <B>writeLocalFileHeader</B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)
|
---|
880 | throws java.io.IOException</PRE>
|
---|
881 | <DL>
|
---|
882 | <DD>Writes the local file header entry
|
---|
883 | <P>
|
---|
884 | <DD><DL>
|
---|
885 |
|
---|
886 | <DT><B>Throws:</B>
|
---|
887 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
888 | <DD>1.1</DD>
|
---|
889 | </DL>
|
---|
890 | </DD>
|
---|
891 | </DL>
|
---|
892 | <HR>
|
---|
893 |
|
---|
894 | <A NAME="writeDataDescriptor(org.apache.tools.zip.ZipEntry)"><!-- --></A><H3>
|
---|
895 | writeDataDescriptor</H3>
|
---|
896 | <PRE>
|
---|
897 | protected void <B>writeDataDescriptor</B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)
|
---|
898 | throws java.io.IOException</PRE>
|
---|
899 | <DL>
|
---|
900 | <DD>Writes the data descriptor entry
|
---|
901 | <P>
|
---|
902 | <DD><DL>
|
---|
903 |
|
---|
904 | <DT><B>Throws:</B>
|
---|
905 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
906 | <DD>1.1</DD>
|
---|
907 | </DL>
|
---|
908 | </DD>
|
---|
909 | </DL>
|
---|
910 | <HR>
|
---|
911 |
|
---|
912 | <A NAME="writeCentralFileHeader(org.apache.tools.zip.ZipEntry)"><!-- --></A><H3>
|
---|
913 | writeCentralFileHeader</H3>
|
---|
914 | <PRE>
|
---|
915 | protected void <B>writeCentralFileHeader</B>(<A HREF="../../../../org/apache/tools/zip/ZipEntry.html" title="class in org.apache.tools.zip">ZipEntry</A> ze)
|
---|
916 | throws java.io.IOException</PRE>
|
---|
917 | <DL>
|
---|
918 | <DD>Writes the central file header entry
|
---|
919 | <P>
|
---|
920 | <DD><DL>
|
---|
921 |
|
---|
922 | <DT><B>Throws:</B>
|
---|
923 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
924 | <DD>1.1</DD>
|
---|
925 | </DL>
|
---|
926 | </DD>
|
---|
927 | </DL>
|
---|
928 | <HR>
|
---|
929 |
|
---|
930 | <A NAME="writeCentralDirectoryEnd()"><!-- --></A><H3>
|
---|
931 | writeCentralDirectoryEnd</H3>
|
---|
932 | <PRE>
|
---|
933 | protected void <B>writeCentralDirectoryEnd</B>()
|
---|
934 | throws java.io.IOException</PRE>
|
---|
935 | <DL>
|
---|
936 | <DD>Writes the "End of central dir record"
|
---|
937 | <P>
|
---|
938 | <DD><DL>
|
---|
939 |
|
---|
940 | <DT><B>Throws:</B>
|
---|
941 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
942 | <DD>1.1</DD>
|
---|
943 | </DL>
|
---|
944 | </DD>
|
---|
945 | </DL>
|
---|
946 | <HR>
|
---|
947 |
|
---|
948 | <A NAME="toDosTime(java.util.Date)"><!-- --></A><H3>
|
---|
949 | toDosTime</H3>
|
---|
950 | <PRE>
|
---|
951 | protected static <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip">ZipLong</A> <B>toDosTime</B>(java.util.Date time)</PRE>
|
---|
952 | <DL>
|
---|
953 | <DD>Convert a Date object to a DOS date/time field.
|
---|
954 |
|
---|
955 | <p>Stolen from InfoZip's <code>fileio.c</code></p>
|
---|
956 | <P>
|
---|
957 | <DD><DL>
|
---|
958 | <DT><B>Since:</B></DT>
|
---|
959 | <DD>1.1</DD>
|
---|
960 | </DL>
|
---|
961 | </DD>
|
---|
962 | </DL>
|
---|
963 | <HR>
|
---|
964 |
|
---|
965 | <A NAME="getBytes(java.lang.String)"><!-- --></A><H3>
|
---|
966 | getBytes</H3>
|
---|
967 | <PRE>
|
---|
968 | protected byte[] <B>getBytes</B>(java.lang.String name)
|
---|
969 | throws java.util.zip.ZipException</PRE>
|
---|
970 | <DL>
|
---|
971 | <DD>Retrieve the bytes for the given String in the encoding set for
|
---|
972 | this Stream.
|
---|
973 | <P>
|
---|
974 | <DD><DL>
|
---|
975 |
|
---|
976 | <DT><B>Throws:</B>
|
---|
977 | <DD><CODE>java.util.zip.ZipException</CODE><DT><B>Since:</B></DT>
|
---|
978 | <DD>1.3</DD>
|
---|
979 | </DL>
|
---|
980 | </DD>
|
---|
981 | </DL>
|
---|
982 | <HR>
|
---|
983 |
|
---|
984 | <A NAME="writeOut(byte[])"><!-- --></A><H3>
|
---|
985 | writeOut</H3>
|
---|
986 | <PRE>
|
---|
987 | protected final void <B>writeOut</B>(byte[] data)
|
---|
988 | throws java.io.IOException</PRE>
|
---|
989 | <DL>
|
---|
990 | <DD>Write bytes to output or random access file
|
---|
991 | <P>
|
---|
992 | <DD><DL>
|
---|
993 |
|
---|
994 | <DT><B>Throws:</B>
|
---|
995 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
996 | <DD>1.14</DD>
|
---|
997 | </DL>
|
---|
998 | </DD>
|
---|
999 | </DL>
|
---|
1000 | <HR>
|
---|
1001 |
|
---|
1002 | <A NAME="writeOut(byte[], int, int)"><!-- --></A><H3>
|
---|
1003 | writeOut</H3>
|
---|
1004 | <PRE>
|
---|
1005 | protected final void <B>writeOut</B>(byte[] data,
|
---|
1006 | int offset,
|
---|
1007 | int length)
|
---|
1008 | throws java.io.IOException</PRE>
|
---|
1009 | <DL>
|
---|
1010 | <DD>Write bytes to output or random access file
|
---|
1011 | <P>
|
---|
1012 | <DD><DL>
|
---|
1013 |
|
---|
1014 | <DT><B>Throws:</B>
|
---|
1015 | <DD><CODE>java.io.IOException</CODE><DT><B>Since:</B></DT>
|
---|
1016 | <DD>1.14</DD>
|
---|
1017 | </DL>
|
---|
1018 | </DD>
|
---|
1019 | </DL>
|
---|
1020 | <HR>
|
---|
1021 |
|
---|
1022 | <A NAME="adjustToLong(int)"><!-- --></A><H3>
|
---|
1023 | adjustToLong</H3>
|
---|
1024 | <PRE>
|
---|
1025 | protected static long <B>adjustToLong</B>(int i)</PRE>
|
---|
1026 | <DL>
|
---|
1027 | <DD>Assumes a negative integer really is a positive integer that
|
---|
1028 | has wrapped around and re-creates the original value.
|
---|
1029 | <P>
|
---|
1030 | <DD><DL>
|
---|
1031 | <DT><B>Since:</B></DT>
|
---|
1032 | <DD>1.17.2.8</DD>
|
---|
1033 | </DL>
|
---|
1034 | </DD>
|
---|
1035 | </DL>
|
---|
1036 | <!-- ========= END OF CLASS DATA ========= -->
|
---|
1037 | <HR>
|
---|
1038 |
|
---|
1039 |
|
---|
1040 | <!-- ======= START OF BOTTOM NAVBAR ====== -->
|
---|
1041 | <A NAME="navbar_bottom"><!-- --></A>
|
---|
1042 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
---|
1043 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
---|
1044 | <TR>
|
---|
1045 | <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
---|
1046 | <A NAME="navbar_bottom_firstrow"><!-- --></A>
|
---|
1047 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
---|
1048 | <TR ALIGN="center" VALIGN="top">
|
---|
1049 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
---|
1050 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
---|
1051 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
---|
1052 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
---|
1053 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
---|
1054 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
---|
1055 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
---|
1056 | </TR>
|
---|
1057 | </TABLE>
|
---|
1058 | </TD>
|
---|
1059 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
---|
1060 | </EM>
|
---|
1061 | </TD>
|
---|
1062 | </TR>
|
---|
1063 |
|
---|
1064 | <TR>
|
---|
1065 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
1066 | <A HREF="../../../../org/apache/tools/zip/ZipLong.html" title="class in org.apache.tools.zip"><B>PREV CLASS</B></A>
|
---|
1067 | <A HREF="../../../../org/apache/tools/zip/ZipShort.html" title="class in org.apache.tools.zip"><B>NEXT CLASS</B></A></FONT></TD>
|
---|
1068 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
---|
1069 | <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>
|
---|
1070 | <A HREF="ZipOutputStream.html" target="_top"><B>NO FRAMES</B></A>
|
---|
1071 | <SCRIPT type="text/javascript">
|
---|
1072 | <!--
|
---|
1073 | if(window==top) {
|
---|
1074 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
---|
1075 | }
|
---|
1076 | //-->
|
---|
1077 | </SCRIPT>
|
---|
1078 | <NOSCRIPT>
|
---|
1079 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
|
---|
1080 | </NOSCRIPT>
|
---|
1081 |
|
---|
1082 | </FONT></TD>
|
---|
1083 | </TR>
|
---|
1084 | <TR>
|
---|
1085 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
1086 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
---|
1087 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
---|
1088 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
---|
1089 | </TR>
|
---|
1090 | </TABLE>
|
---|
1091 | <A NAME="skip-navbar_bottom"></A>
|
---|
1092 | <!-- ======== END OF BOTTOM NAVBAR ======= -->
|
---|
1093 |
|
---|
1094 | <HR>
|
---|
1095 | Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
|
---|
1096 | </BODY>
|
---|
1097 | </HTML>
|
---|