158 |
* is not set in the entry, the current time is used. |
* is not set in the entry, the current time is used. |
159 |
* @param entry the entry. |
* @param entry the entry. |
160 |
* @exception IOException if an I/O error occured. |
* @exception IOException if an I/O error occured. |
161 |
* @exception IllegalStateException if stream was finished |
* @exception ZipException if stream was finished. |
162 |
*/ |
*/ |
163 |
public void putNextEntry(ZipEntry entry) throws IOException |
public void putNextEntry(ZipEntry entry) throws IOException |
164 |
{ |
{ |
165 |
if (entries == null) |
if (entries == null) |
166 |
throw new IllegalStateException("ZipOutputStream was finished"); |
throw new ZipException("ZipOutputStream was finished"); |
167 |
|
|
168 |
int method = entry.getMethod(); |
int method = entry.getMethod(); |
169 |
int flags = 0; |
int flags = 0; |
249 |
/** |
/** |
250 |
* Closes the current entry. |
* Closes the current entry. |
251 |
* @exception IOException if an I/O error occured. |
* @exception IOException if an I/O error occured. |
252 |
* @exception IllegalStateException if no entry is active. |
* @exception ZipException if no entry is active. |
253 |
*/ |
*/ |
254 |
public void closeEntry() throws IOException |
public void closeEntry() throws IOException |
255 |
{ |
{ |
256 |
if (curEntry == null) |
if (curEntry == null) |
257 |
throw new IllegalStateException("No open entry"); |
throw new ZipException("No open entry"); |
258 |
|
|
259 |
/* First finish the deflater, if appropriate */ |
/* First finish the deflater, if appropriate */ |
260 |
if (curMethod == DEFLATED) |
if (curMethod == DEFLATED) |
300 |
/** |
/** |
301 |
* Writes the given buffer to the current entry. |
* Writes the given buffer to the current entry. |
302 |
* @exception IOException if an I/O error occured. |
* @exception IOException if an I/O error occured. |
303 |
* @exception IllegalStateException if no entry is active. |
* @exception ZipException if no entry is active. |
304 |
*/ |
*/ |
305 |
public void write(byte[] b, int off, int len) throws IOException |
public void write(byte[] b, int off, int len) throws IOException |
306 |
{ |
{ |
307 |
if (curEntry == null) |
if (curEntry == null) |
308 |
throw new IllegalStateException("No open entry."); |
throw new ZipException("No open entry."); |
309 |
|
|
310 |
switch (curMethod) |
switch (curMethod) |
311 |
{ |
{ |