Commit 548ce8be by Tom Tromey Committed by Tom Tromey

RuntimeException.java: Re-merge with Classpath.

	* java/lang/RuntimeException.java: Re-merge with Classpath.
	* java/util/ArrayList.java: Likewise.
	* java/util/Arrays.java: Likewise.
	* java/util/BitSet.java: Likewise.
	* java/util/Dictionary.java: Likewise.
	* java/util/IdentityHashMap.java: Likewise.
	* java/util/MissingResourceException.java: Likewise.
	* java/util/Observer.java: Likewise.
	* java/util/TooManyListenersException.java: Likewise.
	* java/util/zip/DataFormatException.java: Likewise.
	* java/util/zip/ZipException.java: Likewise.

From-SVN: r54680
parent 3d05b15f
2002-06-16 Tom Tromey <tromey@redhat.com>
* java/lang/RuntimeException.java: Re-merge with Classpath.
* java/util/ArrayList.java: Likewise.
* java/util/Arrays.java: Likewise.
* java/util/BitSet.java: Likewise.
* java/util/Dictionary.java: Likewise.
* java/util/IdentityHashMap.java: Likewise.
* java/util/MissingResourceException.java: Likewise.
* java/util/Observer.java: Likewise.
* java/util/TooManyListenersException.java: Likewise.
* java/util/zip/DataFormatException.java: Likewise.
* java/util/zip/ZipException.java: Likewise.
2002-06-16 Nathanael Nerode <neroden@twcny.rr.com> 2002-06-16 Nathanael Nerode <neroden@twcny.rr.com>
* java/rmi/AccessException.java: Remerge from Classpath. * java/rmi/AccessException.java: Remerge from Classpath.
......
/* RuntimeException.java -- all exceptions which are subclasses of this class /* RuntimeException.java -- root of all unchecked exceptions
can be thrown at any time during the execution of a Java virtual machine. Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -8,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify ...@@ -8,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU Classpath is distributed in the hope that it will be useful, but GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
...@@ -39,43 +38,65 @@ exception statement from your version. */ ...@@ -39,43 +38,65 @@ exception statement from your version. */
package java.lang; package java.lang;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
/** /**
* Exceptions may be thrown by one part of a Java program and caught
* by another in order to deal with exceptional conditions.
* All exceptions which are subclasses of <code>RuntimeException</code> * All exceptions which are subclasses of <code>RuntimeException</code>
* can be thrown at any time during the execution of a Java virtual machine. * can be thrown at any time during the execution of a Java virtual machine.
* Methods which throw these exceptions are not required to declare them * Methods which throw these exceptions are not required to declare them
* in their throws clause. * in their throws clause.
* *
* @since JDK 1.0
*
* @author Brian Jones * @author Brian Jones
* @author Warren Levy <warrenl@cygnus.com> * @author Warren Levy <warrenl@cygnus.com>
* @date September 18, 1998. * @author Eric Blake <ebb9@email.byu.edu>
* @status updated to 1.4
*/ */
public class RuntimeException extends Exception public class RuntimeException extends Exception
{ {
static final long serialVersionUID = -7034897190745766939L; /**
* Compatible with JDK 1.0+.
*/
private static final long serialVersionUID = -7034897190745766939L;
/** /**
* Create an exception without a message. * Create an exception without a message. The cause remains uninitialized.
*
* @see #initCause(Throwable)
*/ */
public RuntimeException() public RuntimeException()
{ {
super(); }
}
/** /**
* Create an exception with a message. * Create an exception with a message. The cause remains uninitialized.
*
* @param s the message string
* @see #initCause(Throwable)
*/ */
public RuntimeException(String s) public RuntimeException(String s)
{ {
super(s); super(s);
} }
/**
* Create an exception with a message and a cause.
*
* @param s the message string
* @param cause the cause of this exception
* @since 1.4
*/
public RuntimeException(String s, Throwable cause)
{
super(s, cause);
}
/**
* Create an exception with the given cause, and a message of
* <code>cause == null ? null : cause.toString()</code>.
*
* @param cause the cause of this exception
* @since 1.4
*/
public RuntimeException(Throwable cause)
{
super(cause);
}
} }
...@@ -160,7 +160,7 @@ public class ArrayList extends AbstractList ...@@ -160,7 +160,7 @@ public class ArrayList extends AbstractList
/** /**
* Guarantees that this list will have at least enough capacity to * Guarantees that this list will have at least enough capacity to
* hold minCapacity elements. This implementation will grow the list to * hold minCapacity elements. This implementation will grow the list to
* max(current * 2, minCapacity) if (minCapacity > current). The JCL says * max(current * 2, minCapacity) if (minCapacity &gt; current). The JCL says
* explictly that "this method increases its capacity to minCap", while * explictly that "this method increases its capacity to minCap", while
* the JDK 1.3 online docs specify that the list will grow to at least the * the JDK 1.3 online docs specify that the list will grow to at least the
* size specified. * size specified.
......
...@@ -2205,9 +2205,9 @@ public class Arrays ...@@ -2205,9 +2205,9 @@ public class Arrays
* comparable * comparable
* @throws NullPointerException if an element is null (since * @throws NullPointerException if an element is null (since
* null.compareTo cannot work) * null.compareTo cannot work)
* @throws ArrayIndexOutOfBoundsException, if fromIndex and toIndex * @throws ArrayIndexOutOfBoundsException if fromIndex and toIndex
* are not in range. * are not in range.
* @throws IllegalArgumentException if fromIndex > toIndex * @throws IllegalArgumentException if fromIndex &gt; toIndex
*/ */
public static void sort(Object[] a, int fromIndex, int toIndex) public static void sort(Object[] a, int fromIndex, int toIndex)
{ {
...@@ -2229,9 +2229,9 @@ public class Arrays ...@@ -2229,9 +2229,9 @@ public class Arrays
* the elements' natural order * the elements' natural order
* @throws ClassCastException if any two elements are not mutually * @throws ClassCastException if any two elements are not mutually
* comparable by the Comparator provided * comparable by the Comparator provided
* @throws ArrayIndexOutOfBoundsException, if fromIndex and toIndex * @throws ArrayIndexOutOfBoundsException if fromIndex and toIndex
* are not in range. * are not in range.
* @throws IllegalArgumentException if fromIndex > toIndex * @throws IllegalArgumentException if fromIndex &gt; toIndex
* @throws NullPointerException if a null element is compared with natural * @throws NullPointerException if a null element is compared with natural
* ordering (only possible when c is null) * ordering (only possible when c is null)
*/ */
......
...@@ -398,22 +398,24 @@ public class BitSet implements Cloneable, Serializable ...@@ -398,22 +398,24 @@ public class BitSet implements Cloneable, Serializable
* bit <code>k</code> is set in the BitSet (for non-negative values * bit <code>k</code> is set in the BitSet (for non-negative values
* of <code>k</code>) if and only if * of <code>k</code>) if and only if
* *
* <pre> * <code>((k/64) &lt; bits.length)
* ((k/64) < bits.length) && ((bits[k/64] & (1L << (bit % 64))) != 0) * && ((bits[k/64] & (1L &lt;&lt; (bit % 64))) != 0)
* </pre> * </code>
* *
* Then the following definition of the hashCode method * Then the following definition of the hashCode method
* would be a correct implementation of the actual algorithm: * would be a correct implementation of the actual algorithm:
* *
* <pre> *
* public int hashCode() { <pre>public int hashCode()
* long h = 1234; {
* for (int i = bits.length-1; i>=0; i--) { long h = 1234;
* h ^= bits[i] * (i + 1); for (int i = bits.length-1; i &gt;= 0; i--)
* } {
* return (int)((h >> 32) ^ h); h ^= bits[i] * (i + 1);
* } }
* </pre>
return (int)((h >> 32) ^ h);
}</pre>
* *
* Note that the hash code values changes, if the set is changed. * Note that the hash code values changes, if the set is changed.
* *
...@@ -526,10 +528,11 @@ public class BitSet implements Cloneable, Serializable ...@@ -526,10 +528,11 @@ public class BitSet implements Cloneable, Serializable
* Returns the index of the next true bit, from the specified bit * Returns the index of the next true bit, from the specified bit
* (inclusive). If there is none, -1 is returned. You can iterate over * (inclusive). If there is none, -1 is returned. You can iterate over
* all true bits with this loop:<br> * all true bits with this loop:<br>
* <pre> *
* for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) <pre>for (int i = bs.nextSetBit(0); i &gt;= 0; i = bs.nextSetBit(i + 1))
* { // operate on i here } {
* </pre> // operate on i here
}</pre>
* *
* @param from the start location * @param from the start location
* @return the first true bit, or -1 * @return the first true bit, or -1
......
/* Dictionary.java -- an abstract (and essentially worthless) /* Dictionary.java -- an abstract (and essentially worthless)
class which is Hashtable's superclass class which is Hashtable's superclass
Copyright (C) 1998, 2001 Free Software Foundation, Inc. Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -47,18 +47,21 @@ package java.util; ...@@ -47,18 +47,21 @@ package java.util;
* People at Javasoft are probably embarrassed by it. At this point, * People at Javasoft are probably embarrassed by it. At this point,
* it might as well be an interface rather than a class, but it remains * it might as well be an interface rather than a class, but it remains
* this poor, laughable skeleton for the sake of backwards compatibility. * this poor, laughable skeleton for the sake of backwards compatibility.
* At any rate, this was what came before the <pre>Map</pre> interface * At any rate, this was what came before the {@link Map} interface
* in the Collections framework. * in the Collections framework.
* *
* @author Jon Zeppieri * @author Jon Zeppieri
* @author Eric Blake <ebb9@email.byu.edu> * @author Eric Blake (ebb9@email.byu.edu)
* @see Map * @see Map
* @see Hashtable * @see Hashtable
* @since 1.0 * @since 1.0
* @status updated to 1.4 * @status updated to 1.4
*/ */
public abstract class Dictionary extends Object public abstract class Dictionary
{ {
// WARNING: Dictionary is a CORE class in the bootstrap cycle. See the
// comments in vm/reference/java/lang/Runtime for implications of this fact.
/** /**
* Sole constructor (often called implicitly). * Sole constructor (often called implicitly).
*/ */
...@@ -130,4 +133,4 @@ public abstract class Dictionary extends Object ...@@ -130,4 +133,4 @@ public abstract class Dictionary extends Object
* @return the number of keys in the Dictionary * @return the number of keys in the Dictionary
*/ */
public abstract int size(); public abstract int size();
} } // class Dictionary
...@@ -162,9 +162,9 @@ public class IdentityHashMap extends AbstractMap ...@@ -162,9 +162,9 @@ public class IdentityHashMap extends AbstractMap
// Need at least two slots, or hash() will break. // Need at least two slots, or hash() will break.
if (max < 2) if (max < 2)
max = 2; max = 2;
table = new Object[2 * max]; table = new Object[max << 1];
Arrays.fill(table, emptyslot); Arrays.fill(table, emptyslot);
threshold = max / 4 * 3; threshold = (max >> 2) * 3;
} }
/** /**
...@@ -176,7 +176,7 @@ public class IdentityHashMap extends AbstractMap ...@@ -176,7 +176,7 @@ public class IdentityHashMap extends AbstractMap
*/ */
public IdentityHashMap(Map m) public IdentityHashMap(Map m)
{ {
this(Math.max(m.size() * 2, DEFAULT_CAPACITY)); this(Math.max(m.size() << 1, DEFAULT_CAPACITY));
putAll(m); putAll(m);
} }
...@@ -341,12 +341,14 @@ public class IdentityHashMap extends AbstractMap ...@@ -341,12 +341,14 @@ public class IdentityHashMap extends AbstractMap
} }
/** /**
* Return the value in this Map associated with the supplied key, * Return the value in this Map associated with the supplied key, or
* or <pre>null</pre> if the key maps to nothing. NOTE: Since the value * <code>null</code> if the key maps to nothing.
* could also be null, you must use containsKey to see if this key *
* actually maps to something. Unlike normal maps, this tests for the key * <p>NOTE: Since the value could also be null, you must use
* with <code>entry == key</code> instead of * containsKey to see if this key actually maps to something.
* <code>entry == null ? key == null : entry.equals(key)</code>. * Unlike normal maps, this tests for the key with <code>entry ==
* key</code> instead of <code>entry == null ? key == null :
* entry.equals(key)</code>.
* *
* @param key the key for which to fetch an associated value * @param key the key for which to fetch an associated value
* @return what the key maps to, if present * @return what the key maps to, if present
...@@ -487,10 +489,10 @@ public class IdentityHashMap extends AbstractMap ...@@ -487,10 +489,10 @@ public class IdentityHashMap extends AbstractMap
Object[] old = table; Object[] old = table;
// This isn't necessarily prime, but it is an odd number of key/value // This isn't necessarily prime, but it is an odd number of key/value
// slots, which has a higher probability of fewer collisions. // slots, which has a higher probability of fewer collisions.
table = new Object[old.length * 2 + 2]; table = new Object[old.length << 1 + 2];
Arrays.fill(table, emptyslot); Arrays.fill(table, emptyslot);
size = 0; size = 0;
threshold = (table.length / 2) / 4 * 3; threshold = (table.length >>> 3) * 3;
for (int i = old.length - 2; i >= 0; i -= 2) for (int i = old.length - 2; i >= 0; i -= 2)
{ {
...@@ -531,13 +533,15 @@ public class IdentityHashMap extends AbstractMap ...@@ -531,13 +533,15 @@ public class IdentityHashMap extends AbstractMap
} }
/** /**
* Removes from the HashMap and returns the value which is mapped by the * Removes from the HashMap and returns the value which is mapped by
* supplied key. If the key maps to nothing, then the HashMap remains * the supplied key. If the key maps to nothing, then the HashMap
* unchanged, and <pre>null</pre> is returned. NOTE: Since the value * remains unchanged, and <code>null</code> is returned.
* could also be null, you must use containsKey to see if you are *
* actually removing a mapping. Unlike normal maps, this tests for the * NOTE: Since the value could also be null, you must use
* key with <code>entry == key</code> instead of * containsKey to see if you are actually removing a mapping.
* <code>entry == null ? key == null : entry.equals(key)</code>. * Unlike normal maps, this tests for the key with <code>entry ==
* key</code> instead of <code>entry == null ? key == null :
* entry.equals(key)</code>.
* *
* @param key the key used to locate the value to remove * @param key the key used to locate the value to remove
* @return whatever the key mapped to, if present * @return whatever the key mapped to, if present
...@@ -642,7 +646,7 @@ public class IdentityHashMap extends AbstractMap ...@@ -642,7 +646,7 @@ public class IdentityHashMap extends AbstractMap
// By requiring at least 2 key/value slots, and rehashing at 75% // By requiring at least 2 key/value slots, and rehashing at 75%
// capacity, we guarantee that there will always be either an emptyslot // capacity, we guarantee that there will always be either an emptyslot
// or a tombstone somewhere in the table. // or a tombstone somewhere in the table.
int h = 2 * Math.abs(System.identityHashCode(key) % (table.length / 2)); int h = Math.abs(System.identityHashCode(key) % (table.length >> 1)) << 1;
int del = -1; int del = -1;
int save = h; int save = h;
...@@ -735,7 +739,8 @@ public class IdentityHashMap extends AbstractMap ...@@ -735,7 +739,8 @@ public class IdentityHashMap extends AbstractMap
/** /**
* Removes from the backing Map the last element which was fetched * Removes from the backing Map the last element which was fetched
* with the <pre>next()</pre> method. * with the <code>next()</code> method.
*
* @throws ConcurrentModificationException if the Map was modified * @throws ConcurrentModificationException if the Map was modified
* @throws IllegalStateException if called when there is no last element * @throws IllegalStateException if called when there is no last element
*/ */
...@@ -894,7 +899,7 @@ public class IdentityHashMap extends AbstractMap ...@@ -894,7 +899,7 @@ public class IdentityHashMap extends AbstractMap
s.defaultReadObject(); s.defaultReadObject();
int num = s.readInt(); int num = s.readInt();
table = new Object[2 * Math.max(num * 2, DEFAULT_CAPACITY)]; table = new Object[Math.max(num << 1, DEFAULT_CAPACITY) << 1];
// Read key/value pairs. // Read key/value pairs.
while (--num >= 0) while (--num >= 0)
put(s.readObject(), s.readObject()); put(s.readObject(), s.readObject());
......
/* java.util.MissingResourceException /* MissingResourceException.java -- thrown for a missing resource
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -38,38 +38,42 @@ exception statement from your version. */ ...@@ -38,38 +38,42 @@ exception statement from your version. */
package java.util; package java.util;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
/** /**
* This exception is thrown when a resource is missing. * This exception is thrown when a resource is missing.
* *
* @see ResourceBundle
* @author Jochen Hoenicke * @author Jochen Hoenicke
* @author Warren Levy <warrenl@cygnus.com> * @author Warren Levy <warrenl@cygnus.com>
* @see ResourceBundle
* @since 1.1
* @status updated to 1.4
*/ */
public class MissingResourceException extends RuntimeException public class MissingResourceException extends RuntimeException
{ {
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = -4876345176062000401L; private static final long serialVersionUID = -4876345176062000401L;
/** /**
* The name of the resource bundle requested by user. * The name of the resource bundle requested by user.
*
* @serial the class name of the resource bundle
*/ */
private String className; private final String className;
/** /**
* The key of the resource in the bundle requested by user. * The key of the resource in the bundle requested by user.
*
* @serial the name of the resouce
*/ */
private String key; private final String key;
/** /**
* Creates a new exception, with the specified parameters. * Creates a new exception, with the specified parameters.
* @param s the detail message. *
* @param className the name of the resource bundle. * @param s the detail message
* @param key the key of the missing resource. * @param className the name of the resource bundle
* @param key the key of the missing resource
*/ */
public MissingResourceException(String s, String className, String key) public MissingResourceException(String s, String className, String key)
{ {
...@@ -80,7 +84,8 @@ public class MissingResourceException extends RuntimeException ...@@ -80,7 +84,8 @@ public class MissingResourceException extends RuntimeException
/** /**
* Gets the name of the resource bundle, for which a resource is missing. * Gets the name of the resource bundle, for which a resource is missing.
* @return the name of the resource bundle. *
* @return the name of the resource bundle
*/ */
public String getClassName() public String getClassName()
{ {
...@@ -90,7 +95,8 @@ public class MissingResourceException extends RuntimeException ...@@ -90,7 +95,8 @@ public class MissingResourceException extends RuntimeException
/** /**
* Gets the key of the resource that is missing bundle, this is an empty * Gets the key of the resource that is missing bundle, this is an empty
* string if the whole resource bundle is missing. * string if the whole resource bundle is missing.
* @return the name of the resource bundle. *
* @return the name of the resource bundle
*/ */
public String getKey() public String getKey()
{ {
......
/* Implemented when a class wants to be informed of changes in Observable /* Observer.java -- an object that will be informed of changes in an Observable
objects. Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -39,21 +38,23 @@ exception statement from your version. */ ...@@ -39,21 +38,23 @@ exception statement from your version. */
package java.util; package java.util;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct
*/
/** /**
* Interface that is implemented when a class wants to be informed of changes * Interface that is implemented when a class wants to be informed of changes
* in Observable objects. * in Observable objects.
* *
* @see java.util.Observable
* @author Warren Levy <warrenl@cygnus.com> * @author Warren Levy <warrenl@cygnus.com>
* @date August 25, 1998. * @see Observable
* @status updated to 1.4
*/ */
public interface Observer public interface Observer
{ {
/**
* This method is called whenever the observable object changes, and has
* called <code>notifyObservers</code>. The Observable object can pass
* arbitrary information in the second parameter.
*
* @param observable the Observable object that changed
* @param arg arbitrary information, usually relating to the change
*/
public void update(Observable observable, Object arg); public void update(Observable observable, Object arg);
} }
/* java.util.TooManyListenersException /* TooManyListenersException.java -- thrown when a unicast event can't accept
Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. another Listener
Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -38,26 +39,24 @@ exception statement from your version. */ ...@@ -38,26 +39,24 @@ exception statement from your version. */
package java.util; package java.util;
/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
* "The Java Language Specification", ISBN 0-201-63451-1
* plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct.
*/
/** /**
* This exception is part of the java event model. It is thrown if an * This exception is part of the java event model. It is thrown if an
* event listener is added via the addXyzEventListener method, but the * event listener is added via the addXyzEventListener method, but the
* object doesn't support any more listeners, e.g. it only supports a * object doesn't support any more listeners, e.g. it only supports a
* single event listener. * single event listener.
* *
* @author Jochen Hoenicke
* @author Warren Levy <warrenl@cygnus.com>
* @see EventListener * @see EventListener
* @see EventObject * @see EventObject
* @author Jochen Hoenicke * @since 1.1
* @author Warren Levy <warrenl@cygnus.com> * @status updated to 1.4
*/ */
public class TooManyListenersException extends Exception public class TooManyListenersException extends Exception
{ {
/**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 5074640544770687831L; private static final long serialVersionUID = 5074640544770687831L;
/** /**
...@@ -69,7 +68,8 @@ public class TooManyListenersException extends Exception ...@@ -69,7 +68,8 @@ public class TooManyListenersException extends Exception
/** /**
* Constructs a TooManyListenersException with a detail message. * Constructs a TooManyListenersException with a detail message.
* @param detail the detail message. *
* @param detail the detail message
*/ */
public TooManyListenersException(String detail) public TooManyListenersException(String detail)
{ {
......
/* DataformatException.java - Exception thrown when compressed data is corrupt /* DataformatException.java -- thrown when compressed data is corrupt
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -37,25 +37,34 @@ exception statement from your version. */ ...@@ -37,25 +37,34 @@ exception statement from your version. */
package java.util.zip; package java.util.zip;
/* Written using on-line Java Platform 1.2 API Specification.
* Believed complete and correct.
*/
/** /**
* Exception thrown when compressed data is corrupt. * Exception thrown when compressed data is corrupt.
* *
* @author Tom Tromey * @author Tom Tromey
* @author John Leuner * @author John Leuner
* @since JDK 1.1 * @since 1.1
* @status updated to 1.4
*/ */
public class DataFormatException extends Exception public class DataFormatException extends Exception
{ {
public DataFormatException () /**
* Compatible with JDK 1.1+.
*/
private static final long serialVersionUID = 2219632870893641452L;
/**
* Create an exception without a message.
*/
public DataFormatException()
{ {
super();
} }
public DataFormatException (String msg) /**
* Create an exception with a message.
*
* @param msg the message
*/
public DataFormatException(String msg)
{ {
super(msg); super(msg);
} }
......
/* ZipException.java - Exception representing a zip related error /* ZipException.java - exception representing a zip related error
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -37,24 +37,34 @@ exception statement from your version. */ ...@@ -37,24 +37,34 @@ exception statement from your version. */
package java.util.zip; package java.util.zip;
/* Written using on-line Java Platform 1.2 API Specification. import java.io.IOException;
* Believed complete and correct.
*/
/** /**
* Is thrown during the creation or input of a zip file. * Thrown during the creation or input of a zip file.
* *
* @author Jochen Hoenicke * @author Jochen Hoenicke
* @author Per Bothner * @author Per Bothner
* @since JDK 1.1 * @status updated to 1.4
*/ */
public class ZipException extends java.io.IOException public class ZipException extends IOException
{ {
public ZipException () /**
* Compatible with JDK 1.0+.
*/
private static final long serialVersionUID = 8000196834066748623L;
/**
* Create an exception without a message.
*/
public ZipException()
{ {
super();
} }
/**
* Create an exception with a message.
*
* @param msg the message
*/
public ZipException (String msg) public ZipException (String msg)
{ {
super(msg); super(msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment