summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/zip/ZipOutputStream.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/zip/ZipOutputStream.java')
-rw-r--r--libjava/java/util/zip/ZipOutputStream.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/libjava/java/util/zip/ZipOutputStream.java b/libjava/java/util/zip/ZipOutputStream.java
index e4fb864a955..44c4a9cc9b1 100644
--- a/libjava/java/util/zip/ZipOutputStream.java
+++ b/libjava/java/util/zip/ZipOutputStream.java
@@ -158,12 +158,12 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant
* is not set in the entry, the current time is used.
* @param entry the entry.
* @exception IOException if an I/O error occured.
- * @exception IllegalStateException if stream was finished
+ * @exception ZipException if stream was finished.
*/
public void putNextEntry(ZipEntry entry) throws IOException
{
if (entries == null)
- throw new IllegalStateException("ZipOutputStream was finished");
+ throw new ZipException("ZipOutputStream was finished");
int method = entry.getMethod();
int flags = 0;
@@ -249,12 +249,12 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant
/**
* Closes the current entry.
* @exception IOException if an I/O error occured.
- * @exception IllegalStateException if no entry is active.
+ * @exception ZipException if no entry is active.
*/
public void closeEntry() throws IOException
{
if (curEntry == null)
- throw new IllegalStateException("No open entry");
+ throw new ZipException("No open entry");
/* First finish the deflater, if appropriate */
if (curMethod == DEFLATED)
@@ -300,12 +300,12 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant
/**
* Writes the given buffer to the current entry.
* @exception IOException if an I/O error occured.
- * @exception IllegalStateException if no entry is active.
+ * @exception ZipException if no entry is active.
*/
public void write(byte[] b, int off, int len) throws IOException
{
if (curEntry == null)
- throw new IllegalStateException("No open entry.");
+ throw new ZipException("No open entry.");
switch (curMethod)
{
OpenPOWER on IntegriCloud