mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8230648: Replace @exception tag with @throws in java.base
Minor coding style update of javadoc tag in any file in java.base Reviewed-by: prappo, lancea
This commit is contained in:
parent
2fc6c6459d
commit
b15b322cf3
196 changed files with 1959 additions and 1962 deletions
|
@ -2100,11 +2100,11 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* {@code field} in the given {@code style}, or
|
||||
* {@code null} if no string representation is
|
||||
* applicable.
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code field} or {@code style} is invalid,
|
||||
* or if this {@code Calendar} is non-lenient and any
|
||||
* of the calendar fields have invalid values
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if {@code locale} is null
|
||||
* @since 1.6
|
||||
*/
|
||||
|
@ -2191,11 +2191,11 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* {@code style} and {@code locale} and their
|
||||
* field values, or {@code null} if no display names
|
||||
* are defined for {@code field}
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code field} or {@code style} is invalid,
|
||||
* or if this {@code Calendar} is non-lenient and any
|
||||
* of the calendar fields have invalid values
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if {@code locale} is null
|
||||
* @since 1.6
|
||||
*/
|
||||
|
@ -2311,7 +2311,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
*
|
||||
* @return <code>true</code> if the field has been set externally,
|
||||
* <code>false</code> otherwise.
|
||||
* @exception IndexOutOfBoundsException if the specified
|
||||
* @throws IndexOutOfBoundsException if the specified
|
||||
* <code>field</code> is out of range
|
||||
* (<code>field < 0 || field >= FIELD_COUNT</code>).
|
||||
* @see #selectFields()
|
||||
|
@ -2344,7 +2344,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* rather than by calling one of the setter methods.
|
||||
*
|
||||
* @param fieldMask the field to be marked as computed.
|
||||
* @exception IndexOutOfBoundsException if the specified
|
||||
* @throws IndexOutOfBoundsException if the specified
|
||||
* <code>field</code> is out of range
|
||||
* (<code>field < 0 || field >= FIELD_COUNT</code>).
|
||||
* @see #isExternallySet(int)
|
||||
|
@ -2381,7 +2381,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
*
|
||||
* @param fieldMask the field mask indicating which calendar fields are in
|
||||
* sync with the time value.
|
||||
* @exception IndexOutOfBoundsException if the specified
|
||||
* @throws IndexOutOfBoundsException if the specified
|
||||
* <code>field</code> is out of range
|
||||
* (<code>field < 0 || field >= FIELD_COUNT</code>).
|
||||
* @see #isExternallySet(int)
|
||||
|
@ -2806,9 +2806,9 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* before the time represented by the argument; and a value greater than
|
||||
* <code>0</code> if the time of this <code>Calendar</code> is after the
|
||||
* time represented by the argument.
|
||||
* @exception NullPointerException if the specified <code>Calendar</code> is
|
||||
* @throws NullPointerException if the specified <code>Calendar</code> is
|
||||
* <code>null</code>.
|
||||
* @exception IllegalArgumentException if the time value of the
|
||||
* @throws IllegalArgumentException if the time value of the
|
||||
* specified <code>Calendar</code> object can't be obtained due to
|
||||
* any invalid calendar values.
|
||||
* @since 1.5
|
||||
|
@ -3054,7 +3054,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* {@link UnsupportedOperationException}.
|
||||
*
|
||||
* @return the week year of this {@code Calendar}
|
||||
* @exception UnsupportedOperationException
|
||||
* @throws UnsupportedOperationException
|
||||
* if any week year numbering isn't supported
|
||||
* in this {@code Calendar}.
|
||||
* @see #isWeekDateSupported()
|
||||
|
@ -3086,11 +3086,11 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* @param dayOfWeek the day of week value: one of the constants
|
||||
* for the {@link #DAY_OF_WEEK} field: {@link
|
||||
* #SUNDAY}, ..., {@link #SATURDAY}.
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if any of the given date specifiers is invalid
|
||||
* or any of the calendar fields are inconsistent
|
||||
* with the given date specifiers in non-lenient mode
|
||||
* @exception UnsupportedOperationException
|
||||
* @throws UnsupportedOperationException
|
||||
* if any week year numbering isn't supported in this
|
||||
* {@code Calendar}.
|
||||
* @see #isWeekDateSupported()
|
||||
|
@ -3110,7 +3110,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
* {@code UnsupportedOperationException}.
|
||||
*
|
||||
* @return the number of weeks in the week year.
|
||||
* @exception UnsupportedOperationException
|
||||
* @throws UnsupportedOperationException
|
||||
* if any week year numbering isn't supported in this
|
||||
* {@code Calendar}.
|
||||
* @see #WEEK_OF_YEAR
|
||||
|
@ -3351,7 +3351,7 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
|
|||
*
|
||||
* @param field the calendar field
|
||||
* @return the calendar field name
|
||||
* @exception IndexOutOfBoundsException if <code>field</code> is negative,
|
||||
* @throws IndexOutOfBoundsException if <code>field</code> is negative,
|
||||
* equal to or greater than {@code FIELD_COUNT}.
|
||||
*/
|
||||
static String getFieldName(int field) {
|
||||
|
|
|
@ -289,8 +289,8 @@ public final class Currency implements Serializable {
|
|||
*
|
||||
* @param currencyCode the ISO 4217 code of the currency
|
||||
* @return the <code>Currency</code> instance for the given currency code
|
||||
* @exception NullPointerException if <code>currencyCode</code> is null
|
||||
* @exception IllegalArgumentException if <code>currencyCode</code> is not
|
||||
* @throws NullPointerException if <code>currencyCode</code> is null
|
||||
* @throws IllegalArgumentException if <code>currencyCode</code> is not
|
||||
* a supported ISO 4217 code.
|
||||
*/
|
||||
public static Currency getInstance(String currencyCode) {
|
||||
|
@ -372,9 +372,9 @@ public final class Currency implements Serializable {
|
|||
* instance is needed
|
||||
* @return the <code>Currency</code> instance for the country of the given
|
||||
* locale, or {@code null}
|
||||
* @exception NullPointerException if <code>locale</code>
|
||||
* @throws NullPointerException if <code>locale</code>
|
||||
* is {@code null}
|
||||
* @exception IllegalArgumentException if the country of the given {@code locale}
|
||||
* @throws IllegalArgumentException if the country of the given {@code locale}
|
||||
* is not a supported ISO 3166 country code.
|
||||
*/
|
||||
public static Currency getInstance(Locale locale) {
|
||||
|
@ -537,7 +537,7 @@ public final class Currency implements Serializable {
|
|||
* @param locale the locale for which a display name for this currency is
|
||||
* needed
|
||||
* @return the symbol of this currency for the specified locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
*/
|
||||
public String getSymbol(Locale locale) {
|
||||
LocaleServiceProviderPool pool =
|
||||
|
@ -632,7 +632,7 @@ public final class Currency implements Serializable {
|
|||
* @param locale the locale for which a display name for this currency is
|
||||
* needed
|
||||
* @return the display name of this currency for the specified locale
|
||||
* @exception NullPointerException if <code>locale</code> is null
|
||||
* @throws NullPointerException if <code>locale</code> is null
|
||||
* @since 1.7
|
||||
*/
|
||||
public String getDisplayName(Locale locale) {
|
||||
|
@ -1197,5 +1197,3 @@ public final class Currency implements Serializable {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -910,7 +910,7 @@ public class Date
|
|||
* represented by this {@code Date} object is strictly
|
||||
* earlier than the instant represented by {@code when};
|
||||
* {@code false} otherwise.
|
||||
* @exception NullPointerException if {@code when} is null.
|
||||
* @throws NullPointerException if {@code when} is null.
|
||||
*/
|
||||
public boolean before(Date when) {
|
||||
return getMillisOf(this) < getMillisOf(when);
|
||||
|
@ -924,7 +924,7 @@ public class Date
|
|||
* by this {@code Date} object is strictly later than the
|
||||
* instant represented by {@code when};
|
||||
* {@code false} otherwise.
|
||||
* @exception NullPointerException if {@code when} is null.
|
||||
* @throws NullPointerException if {@code when} is null.
|
||||
*/
|
||||
public boolean after(Date when) {
|
||||
return getMillisOf(this) > getMillisOf(when);
|
||||
|
@ -973,7 +973,7 @@ public class Date
|
|||
* is before the Date argument; and a value greater than
|
||||
* {@code 0} if this Date is after the Date argument.
|
||||
* @since 1.2
|
||||
* @exception NullPointerException if {@code anotherDate} is null.
|
||||
* @throws NullPointerException if {@code anotherDate} is null.
|
||||
*/
|
||||
public int compareTo(Date anotherDate) {
|
||||
long thisTime = getMillisOf(this);
|
||||
|
@ -1353,8 +1353,8 @@ public class Date
|
|||
* @param instant the instant to convert
|
||||
* @return a {@code Date} representing the same point on the time-line as
|
||||
* the provided instant
|
||||
* @exception NullPointerException if {@code instant} is null.
|
||||
* @exception IllegalArgumentException if the instant is too large to
|
||||
* @throws NullPointerException if {@code instant} is null.
|
||||
* @throws IllegalArgumentException if the instant is too large to
|
||||
* represent as a {@code Date}
|
||||
* @since 1.8
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -106,7 +106,7 @@ class Dictionary<K,V> {
|
|||
* @param key a key in this dictionary.
|
||||
* {@code null} if the key is not mapped to any value in
|
||||
* this dictionary.
|
||||
* @exception NullPointerException if the {@code key} is {@code null}.
|
||||
* @throws NullPointerException if the {@code key} is {@code null}.
|
||||
* @see java.util.Dictionary#put(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
public abstract V get(Object key);
|
||||
|
@ -133,7 +133,7 @@ class Dictionary<K,V> {
|
|||
* @return the previous value to which the {@code key} was mapped
|
||||
* in this dictionary, or {@code null} if the key did not
|
||||
* have a previous mapping.
|
||||
* @exception NullPointerException if the {@code key} or
|
||||
* @throws NullPointerException if the {@code key} or
|
||||
* {@code value} is {@code null}.
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
* @see java.util.Dictionary#get(java.lang.Object)
|
||||
|
@ -149,7 +149,7 @@ class Dictionary<K,V> {
|
|||
* @return the value to which the {@code key} had been mapped in this
|
||||
* dictionary, or {@code null} if the key did not have a
|
||||
* mapping.
|
||||
* @exception NullPointerException if {@code key} is {@code null}.
|
||||
* @throws NullPointerException if {@code key} is {@code null}.
|
||||
*/
|
||||
public abstract V remove(Object key);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -76,7 +76,7 @@ public interface Enumeration<E> {
|
|||
* object has at least one more element to provide.
|
||||
*
|
||||
* @return the next element of this enumeration.
|
||||
* @exception NoSuchElementException if no more elements exist.
|
||||
* @throws NoSuchElementException if no more elements exist.
|
||||
*/
|
||||
E nextElement();
|
||||
|
||||
|
|
|
@ -904,7 +904,7 @@ public class GregorianCalendar extends Calendar {
|
|||
*
|
||||
* @param field the calendar field.
|
||||
* @param amount the amount of date or time to be added to the field.
|
||||
* @exception IllegalArgumentException if <code>field</code> is
|
||||
* @throws IllegalArgumentException if <code>field</code> is
|
||||
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
|
||||
* or if any calendar fields have out-of-range values in
|
||||
* non-lenient mode.
|
||||
|
@ -1101,7 +1101,7 @@ public class GregorianCalendar extends Calendar {
|
|||
*
|
||||
* @param up indicates if the value of the specified calendar field is to be
|
||||
* rolled up or rolled down. Use <code>true</code> if rolling up, <code>false</code> otherwise.
|
||||
* @exception IllegalArgumentException if <code>field</code> is
|
||||
* @throws IllegalArgumentException if <code>field</code> is
|
||||
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
|
||||
* or if any calendar fields have out-of-range values in
|
||||
* non-lenient mode.
|
||||
|
@ -1148,7 +1148,7 @@ public class GregorianCalendar extends Calendar {
|
|||
*
|
||||
* @param field the calendar field.
|
||||
* @param amount the signed amount to add to <code>field</code>.
|
||||
* @exception IllegalArgumentException if <code>field</code> is
|
||||
* @throws IllegalArgumentException if <code>field</code> is
|
||||
* <code>ZONE_OFFSET</code>, <code>DST_OFFSET</code>, or unknown,
|
||||
* or if any calendar fields have out-of-range values in
|
||||
* non-lenient mode.
|
||||
|
@ -2183,7 +2183,7 @@ public class GregorianCalendar extends Calendar {
|
|||
* for the {@link #DAY_OF_WEEK DAY_OF_WEEK} field:
|
||||
* {@link Calendar#SUNDAY SUNDAY}, ...,
|
||||
* {@link Calendar#SATURDAY SATURDAY}.
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if any of the given date specifiers is invalid,
|
||||
* or if any of the calendar fields are inconsistent
|
||||
* with the given date specifiers in non-lenient mode
|
||||
|
@ -2626,7 +2626,7 @@ public class GregorianCalendar extends Calendar {
|
|||
* Converts calendar field values to the time value (millisecond
|
||||
* offset from the <a href="Calendar.html#Epoch">Epoch</a>).
|
||||
*
|
||||
* @exception IllegalArgumentException if any calendar fields are invalid.
|
||||
* @throws IllegalArgumentException if any calendar fields are invalid.
|
||||
*/
|
||||
@Override
|
||||
protected void computeTime() {
|
||||
|
@ -3279,8 +3279,8 @@ public class GregorianCalendar extends Calendar {
|
|||
* @param zdt the zoned date-time object to convert
|
||||
* @return the gregorian calendar representing the same point on the
|
||||
* time-line as the zoned date-time provided
|
||||
* @exception NullPointerException if {@code zdt} is null
|
||||
* @exception IllegalArgumentException if the zoned date-time is too
|
||||
* @throws NullPointerException if {@code zdt} is null
|
||||
* @throws IllegalArgumentException if the zoned date-time is too
|
||||
* large to represent as a {@code GregorianCalendar}
|
||||
* @since 1.8
|
||||
*/
|
||||
|
|
|
@ -180,7 +180,7 @@ public class Hashtable<K,V>
|
|||
*
|
||||
* @param initialCapacity the initial capacity of the hashtable.
|
||||
* @param loadFactor the load factor of the hashtable.
|
||||
* @exception IllegalArgumentException if the initial capacity is less
|
||||
* @throws IllegalArgumentException if the initial capacity is less
|
||||
* than zero, or if the load factor is nonpositive.
|
||||
*/
|
||||
public Hashtable(int initialCapacity, float loadFactor) {
|
||||
|
@ -202,7 +202,7 @@ public class Hashtable<K,V>
|
|||
* and default load factor (0.75).
|
||||
*
|
||||
* @param initialCapacity the initial capacity of the hashtable.
|
||||
* @exception IllegalArgumentException if the initial capacity is less
|
||||
* @throws IllegalArgumentException if the initial capacity is less
|
||||
* than zero.
|
||||
*/
|
||||
public Hashtable(int initialCapacity) {
|
||||
|
@ -304,7 +304,7 @@ public class Hashtable<K,V>
|
|||
* {@code value} argument in this hashtable as
|
||||
* determined by the {@code equals} method;
|
||||
* {@code false} otherwise.
|
||||
* @exception NullPointerException if the value is {@code null}
|
||||
* @throws NullPointerException if the value is {@code null}
|
||||
*/
|
||||
public synchronized boolean contains(Object value) {
|
||||
if (value == null) {
|
||||
|
@ -465,7 +465,7 @@ public class Hashtable<K,V>
|
|||
* @param value the value
|
||||
* @return the previous value of the specified key in this hashtable,
|
||||
* or {@code null} if it did not have one
|
||||
* @exception NullPointerException if the key or value is
|
||||
* @throws NullPointerException if the key or value is
|
||||
* {@code null}
|
||||
* @see Object#equals(Object)
|
||||
* @see #get(Object)
|
||||
|
|
|
@ -418,7 +418,7 @@ class JapaneseImperialCalendar extends Calendar {
|
|||
*
|
||||
* @param field the calendar field.
|
||||
* @param amount the amount of date or time to be added to the field.
|
||||
* @exception IllegalArgumentException if {@code field} is
|
||||
* @throws IllegalArgumentException if {@code field} is
|
||||
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
|
||||
* or if any calendar fields have out-of-range values in
|
||||
* non-lenient mode.
|
||||
|
@ -569,7 +569,7 @@ class JapaneseImperialCalendar extends Calendar {
|
|||
*
|
||||
* @param field the calendar field.
|
||||
* @param amount the signed amount to add to {@code field}.
|
||||
* @exception IllegalArgumentException if {@code field} is
|
||||
* @throws IllegalArgumentException if {@code field} is
|
||||
* {@code ZONE_OFFSET}, {@code DST_OFFSET}, or unknown,
|
||||
* or if any calendar fields have out-of-range values in
|
||||
* non-lenient mode.
|
||||
|
@ -1867,7 +1867,7 @@ class JapaneseImperialCalendar extends Calendar {
|
|||
* Converts calendar field values to the time value (millisecond
|
||||
* offset from the <a href="Calendar.html#Epoch">Epoch</a>).
|
||||
*
|
||||
* @exception IllegalArgumentException if any calendar fields are invalid.
|
||||
* @throws IllegalArgumentException if any calendar fields are invalid.
|
||||
*/
|
||||
protected void computeTime() {
|
||||
// In non-lenient mode, perform brief checking of calendar
|
||||
|
|
|
@ -740,7 +740,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* See the <code>Locale</code> class description about valid country values.
|
||||
* @param variant Any arbitrary value used to indicate a variation of a <code>Locale</code>.
|
||||
* See the <code>Locale</code> class description for the details.
|
||||
* @exception NullPointerException thrown if any argument is null.
|
||||
* @throws NullPointerException thrown if any argument is null.
|
||||
*/
|
||||
public Locale(String language, String country, String variant) {
|
||||
if (language == null || country == null || variant == null) {
|
||||
|
@ -770,7 +770,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* valid language values.
|
||||
* @param country An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code.
|
||||
* See the <code>Locale</code> class description about valid country values.
|
||||
* @exception NullPointerException thrown if either argument is null.
|
||||
* @throws NullPointerException thrown if either argument is null.
|
||||
*/
|
||||
public Locale(String language, String country) {
|
||||
this(language, country, "");
|
||||
|
@ -793,7 +793,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* @param language An ISO 639 alpha-2 or alpha-3 language code, or a language subtag
|
||||
* up to 8 characters in length. See the <code>Locale</code> class description about
|
||||
* valid language values.
|
||||
* @exception NullPointerException thrown if argument is null.
|
||||
* @throws NullPointerException thrown if argument is null.
|
||||
* @since 1.4
|
||||
*/
|
||||
public Locale(String language) {
|
||||
|
@ -812,7 +812,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* @param country uppercase two-letter ISO-3166 code and numeric-3 UN M.49 area code.
|
||||
* @param variant vendor and browser specific code. See class description.
|
||||
* @return the <code>Locale</code> instance requested
|
||||
* @exception NullPointerException if any argument is null.
|
||||
* @throws NullPointerException if any argument is null.
|
||||
*/
|
||||
static Locale getInstance(String language, String country, String variant) {
|
||||
return getInstance(language, "", country, variant, null);
|
||||
|
@ -1737,7 +1737,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* not specify a language the empty string is returned.
|
||||
*
|
||||
* @return A three-letter abbreviation of this locale's language.
|
||||
* @exception MissingResourceException Throws MissingResourceException if
|
||||
* @throws MissingResourceException Throws MissingResourceException if
|
||||
* three-letter language abbreviation is not available for this locale.
|
||||
*/
|
||||
public String getISO3Language() throws MissingResourceException {
|
||||
|
@ -1764,7 +1764,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
* <p>The ISO 3166-1 codes can be found on-line.
|
||||
*
|
||||
* @return A three-letter abbreviation of this locale's country.
|
||||
* @exception MissingResourceException Throws MissingResourceException if the
|
||||
* @throws MissingResourceException Throws MissingResourceException if the
|
||||
* three-letter country abbreviation is not available for this locale.
|
||||
*/
|
||||
public String getISO3Country() throws MissingResourceException {
|
||||
|
@ -1834,7 +1834,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
*
|
||||
* @param inLocale The locale for which to retrieve the display language.
|
||||
* @return The name of the display language appropriate to the given locale.
|
||||
* @exception NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
*/
|
||||
public String getDisplayLanguage(Locale inLocale) {
|
||||
return getDisplayString(baseLocale.getLanguage(), null, inLocale, DISPLAY_LANGUAGE);
|
||||
|
@ -1907,7 +1907,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
*
|
||||
* @param inLocale The locale for which to retrieve the display country.
|
||||
* @return The name of the country appropriate to the given locale.
|
||||
* @exception NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
*/
|
||||
public String getDisplayCountry(Locale inLocale) {
|
||||
return getDisplayString(baseLocale.getRegion(), null, inLocale, DISPLAY_COUNTRY);
|
||||
|
@ -1949,7 +1949,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
*
|
||||
* @param inLocale The locale for which to retrieve the display variant code.
|
||||
* @return The name of the display variant code appropriate to the given locale.
|
||||
* @exception NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
* @throws NullPointerException if <code>inLocale</code> is <code>null</code>
|
||||
*/
|
||||
public String getDisplayVariant(Locale inLocale) {
|
||||
if (baseLocale.getVariant().isEmpty())
|
||||
|
|
|
@ -394,7 +394,7 @@ class Properties extends Hashtable<Object,Object> {
|
|||
* The specified stream remains open after this method returns.
|
||||
*
|
||||
* @param inStream the input stream.
|
||||
* @exception IOException if an error occurred when reading from the
|
||||
* @throws IOException if an error occurred when reading from the
|
||||
* input stream.
|
||||
* @throws IllegalArgumentException if the input stream contains a
|
||||
* malformed Unicode escape sequence.
|
||||
|
@ -801,7 +801,7 @@ class Properties extends Hashtable<Object,Object> {
|
|||
*
|
||||
* @param out an output stream.
|
||||
* @param comments a description of the property list.
|
||||
* @exception ClassCastException if this {@code Properties} object
|
||||
* @throws ClassCastException if this {@code Properties} object
|
||||
* contains any keys or values that are not
|
||||
* {@code Strings}.
|
||||
*/
|
||||
|
@ -853,11 +853,11 @@ class Properties extends Hashtable<Object,Object> {
|
|||
*
|
||||
* @param writer an output character stream writer.
|
||||
* @param comments a description of the property list.
|
||||
* @exception IOException if writing this property list to the specified
|
||||
* @throws IOException if writing this property list to the specified
|
||||
* output stream throws an {@code IOException}.
|
||||
* @exception ClassCastException if this {@code Properties} object
|
||||
* @throws ClassCastException if this {@code Properties} object
|
||||
* contains any keys or values that are not {@code Strings}.
|
||||
* @exception NullPointerException if {@code writer} is null.
|
||||
* @throws NullPointerException if {@code writer} is null.
|
||||
* @since 1.6
|
||||
*/
|
||||
public void store(Writer writer, String comments)
|
||||
|
@ -900,11 +900,11 @@ class Properties extends Hashtable<Object,Object> {
|
|||
*
|
||||
* @param out an output stream.
|
||||
* @param comments a description of the property list.
|
||||
* @exception IOException if writing this property list to the specified
|
||||
* @throws IOException if writing this property list to the specified
|
||||
* output stream throws an {@code IOException}.
|
||||
* @exception ClassCastException if this {@code Properties} object
|
||||
* @throws ClassCastException if this {@code Properties} object
|
||||
* contains any keys or values that are not {@code Strings}.
|
||||
* @exception NullPointerException if {@code out} is null.
|
||||
* @throws NullPointerException if {@code out} is null.
|
||||
* @since 1.2
|
||||
*/
|
||||
public void store(OutputStream out, String comments)
|
||||
|
|
|
@ -463,10 +463,10 @@ final class PropertyPermissionCollection extends PermissionCollection
|
|||
*
|
||||
* @param permission the Permission object to add.
|
||||
*
|
||||
* @exception IllegalArgumentException - if the permission is not a
|
||||
* @throws IllegalArgumentException - if the permission is not a
|
||||
* PropertyPermission
|
||||
*
|
||||
* @exception SecurityException - if this PropertyPermissionCollection
|
||||
* @throws SecurityException - if this PropertyPermissionCollection
|
||||
* object has been marked readonly
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -512,9 +512,9 @@ public abstract class ResourceBundle {
|
|||
* </blockquote>
|
||||
*
|
||||
* @param key the key for the desired string
|
||||
* @exception NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @exception MissingResourceException if no object for the given key can be found
|
||||
* @exception ClassCastException if the object found for the given key is not a string
|
||||
* @throws NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @throws MissingResourceException if no object for the given key can be found
|
||||
* @throws ClassCastException if the object found for the given key is not a string
|
||||
* @return the string for the given key
|
||||
*/
|
||||
public final String getString(String key) {
|
||||
|
@ -529,9 +529,9 @@ public abstract class ResourceBundle {
|
|||
* </blockquote>
|
||||
*
|
||||
* @param key the key for the desired string array
|
||||
* @exception NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @exception MissingResourceException if no object for the given key can be found
|
||||
* @exception ClassCastException if the object found for the given key is not a string array
|
||||
* @throws NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @throws MissingResourceException if no object for the given key can be found
|
||||
* @throws ClassCastException if the object found for the given key is not a string array
|
||||
* @return the string array for the given key
|
||||
*/
|
||||
public final String[] getStringArray(String key) {
|
||||
|
@ -547,8 +547,8 @@ public abstract class ResourceBundle {
|
|||
* If still not successful, it throws a MissingResourceException.
|
||||
*
|
||||
* @param key the key for the desired object
|
||||
* @exception NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @exception MissingResourceException if no object for the given key can be found
|
||||
* @throws NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @throws MissingResourceException if no object for the given key can be found
|
||||
* @return the object for the given key
|
||||
*/
|
||||
public final Object getObject(String key) {
|
||||
|
@ -841,9 +841,9 @@ public abstract class ResourceBundle {
|
|||
* </blockquote>
|
||||
*
|
||||
* @param baseName the base name of the resource bundle, a fully qualified class name
|
||||
* @exception java.lang.NullPointerException
|
||||
* @throws java.lang.NullPointerException
|
||||
* if <code>baseName</code> is <code>null</code>
|
||||
* @exception MissingResourceException
|
||||
* @throws MissingResourceException
|
||||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and the default locale
|
||||
*
|
||||
|
@ -915,9 +915,9 @@ public abstract class ResourceBundle {
|
|||
* the base name of the resource bundle, a fully qualified class name
|
||||
* @param locale
|
||||
* the locale for which a resource bundle is desired
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> or <code>locale</code> is <code>null</code>
|
||||
* @exception MissingResourceException
|
||||
* @throws MissingResourceException
|
||||
* if no resource bundle for the specified base name can be found
|
||||
* @return a resource bundle for the given base name and locale
|
||||
*
|
||||
|
@ -1264,9 +1264,9 @@ public abstract class ResourceBundle {
|
|||
* @param locale the locale for which a resource bundle is desired
|
||||
* @param loader the class loader from which to load the resource bundle
|
||||
* @return a resource bundle for the given base name and locale
|
||||
* @exception java.lang.NullPointerException
|
||||
* @throws java.lang.NullPointerException
|
||||
* if <code>baseName</code>, <code>locale</code>, or <code>loader</code> is <code>null</code>
|
||||
* @exception MissingResourceException
|
||||
* @throws MissingResourceException
|
||||
* if no resource bundle for the specified base name can be found
|
||||
* @since 1.2
|
||||
* @revised 9
|
||||
|
@ -2250,7 +2250,7 @@ public abstract class ResourceBundle {
|
|||
* by the given class loader.
|
||||
*
|
||||
* @param loader the class loader
|
||||
* @exception NullPointerException if <code>loader</code> is null
|
||||
* @throws NullPointerException if <code>loader</code> is null
|
||||
* @since 1.6
|
||||
* @see ResourceBundle.Control#getTimeToLive(String,Locale)
|
||||
*/
|
||||
|
@ -2271,7 +2271,7 @@ public abstract class ResourceBundle {
|
|||
* object for the given key.
|
||||
*
|
||||
* @param key the key for the desired object
|
||||
* @exception NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @throws NullPointerException if <code>key</code> is <code>null</code>
|
||||
* @return the object for the given key, or null
|
||||
*/
|
||||
protected abstract Object handleGetObject(String key);
|
||||
|
@ -2293,7 +2293,7 @@ public abstract class ResourceBundle {
|
|||
* @return <code>true</code> if the given <code>key</code> is
|
||||
* contained in this <code>ResourceBundle</code> or its
|
||||
* parent bundles; <code>false</code> otherwise.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>key</code> is <code>null</code>
|
||||
* @since 1.6
|
||||
*/
|
||||
|
@ -2598,9 +2598,9 @@ public abstract class ResourceBundle {
|
|||
* <code>ResourceBundle.Control.getFormats</code> method
|
||||
* @return a <code>ResourceBundle.Control</code> supporting the
|
||||
* specified <code>formats</code>
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>formats</code> is <code>null</code>
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if <code>formats</code> is unknown
|
||||
*/
|
||||
public static final Control getControl(List<String> formats) {
|
||||
|
@ -2633,9 +2633,9 @@ public abstract class ResourceBundle {
|
|||
* @return a <code>ResourceBundle.Control</code> supporting the
|
||||
* specified <code>formats</code> with no fallback
|
||||
* <code>Locale</code> support
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>formats</code> is <code>null</code>
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if <code>formats</code> is unknown
|
||||
*/
|
||||
public static final Control getNoFallbackControl(List<String> formats) {
|
||||
|
@ -2679,7 +2679,7 @@ public abstract class ResourceBundle {
|
|||
* name
|
||||
* @return a <code>List</code> of <code>String</code>s containing
|
||||
* formats for loading resource bundles.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> is null
|
||||
* @see #FORMAT_DEFAULT
|
||||
* @see #FORMAT_CLASS
|
||||
|
@ -2866,7 +2866,7 @@ public abstract class ResourceBundle {
|
|||
* the locale for which a resource bundle is desired
|
||||
* @return a <code>List</code> of candidate
|
||||
* <code>Locale</code>s for the given <code>locale</code>
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> or <code>locale</code> is
|
||||
* <code>null</code>
|
||||
*/
|
||||
|
@ -3034,7 +3034,7 @@ public abstract class ResourceBundle {
|
|||
* @return a <code>Locale</code> for the fallback search,
|
||||
* or <code>null</code> if no further fallback search
|
||||
* is desired.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> or <code>locale</code>
|
||||
* is <code>null</code>
|
||||
*/
|
||||
|
@ -3127,29 +3127,29 @@ public abstract class ResourceBundle {
|
|||
* <code>false</code> otherwise
|
||||
* @return the resource bundle instance,
|
||||
* or <code>null</code> if none could be found.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>bundleName</code>, <code>locale</code>,
|
||||
* <code>format</code>, or <code>loader</code> is
|
||||
* <code>null</code>, or if <code>null</code> is returned by
|
||||
* {@link #toBundleName(String, Locale) toBundleName}
|
||||
* @exception IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if <code>format</code> is unknown, or if the resource
|
||||
* found for the given parameters contains malformed data.
|
||||
* @exception ClassCastException
|
||||
* @throws ClassCastException
|
||||
* if the loaded class cannot be cast to <code>ResourceBundle</code>
|
||||
* @exception IllegalAccessException
|
||||
* @throws IllegalAccessException
|
||||
* if the class or its nullary constructor is not
|
||||
* accessible.
|
||||
* @exception InstantiationException
|
||||
* @throws InstantiationException
|
||||
* if the instantiation of a class fails for some other
|
||||
* reason.
|
||||
* @exception ExceptionInInitializerError
|
||||
* @throws ExceptionInInitializerError
|
||||
* if the initialization provoked by this method fails.
|
||||
* @exception SecurityException
|
||||
* @throws SecurityException
|
||||
* If a security manager is present and creation of new
|
||||
* instances is denied. See {@link Class#newInstance()}
|
||||
* for details.
|
||||
* @exception IOException
|
||||
* @throws IOException
|
||||
* if an error occurred when reading resources using
|
||||
* any I/O operations
|
||||
* @see java.util.spi.ResourceBundleProvider#getBundle(String, Locale)
|
||||
|
@ -3295,7 +3295,7 @@ public abstract class ResourceBundle {
|
|||
* {@link #TTL_NO_EXPIRATION_CONTROL} to disable the
|
||||
* expiration control, or {@link #TTL_DONT_CACHE} to disable
|
||||
* caching.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> or <code>locale</code> is
|
||||
* <code>null</code>
|
||||
*/
|
||||
|
@ -3350,7 +3350,7 @@ public abstract class ResourceBundle {
|
|||
* in the cache
|
||||
* @return <code>true</code> if the expired bundle needs to be
|
||||
* reloaded; <code>false</code> otherwise.
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code>, <code>locale</code>,
|
||||
* <code>format</code>, <code>loader</code>, or
|
||||
* <code>bundle</code> is <code>null</code>
|
||||
|
@ -3437,7 +3437,7 @@ public abstract class ResourceBundle {
|
|||
* the locale for which a resource bundle should be
|
||||
* loaded
|
||||
* @return the bundle name for the resource bundle
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if <code>baseName</code> or <code>locale</code>
|
||||
* is <code>null</code>
|
||||
* @see java.util.spi.AbstractResourceBundleProvider#toBundleName(String, Locale)
|
||||
|
@ -3495,7 +3495,7 @@ public abstract class ResourceBundle {
|
|||
* @param suffix
|
||||
* the file type suffix
|
||||
* @return the converted resource name
|
||||
* @exception NullPointerException
|
||||
* @throws NullPointerException
|
||||
* if {@code bundleName} or {@code suffix}
|
||||
* is {@code null}
|
||||
*/
|
||||
|
|
|
@ -209,7 +209,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param endTime The daylight saving ending time in local wall clock time,
|
||||
* (in milliseconds within the day) which is local daylight
|
||||
* time in this case.
|
||||
* @exception IllegalArgumentException if the month, day, dayOfWeek, or time
|
||||
* @throws IllegalArgumentException if the month, day, dayOfWeek, or time
|
||||
* parameters are out of range for the start or end rule
|
||||
*/
|
||||
public SimpleTimeZone(int rawOffset, String ID,
|
||||
|
@ -266,7 +266,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* which is local daylight time in this case.
|
||||
* @param dstSavings The amount of time in milliseconds saved during
|
||||
* daylight saving time.
|
||||
* @exception IllegalArgumentException if the month, day, dayOfWeek, or time
|
||||
* @throws IllegalArgumentException if the month, day, dayOfWeek, or time
|
||||
* parameters are out of range for the start or end rule
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -316,7 +316,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param dstSavings The amount of time in milliseconds saved during
|
||||
* daylight saving time.
|
||||
*
|
||||
* @exception IllegalArgumentException if the month, day, dayOfWeek, time more, or
|
||||
* @throws IllegalArgumentException if the month, day, dayOfWeek, time more, or
|
||||
* time parameters are out of range for the start or end rule, or if a time mode
|
||||
* value is invalid.
|
||||
*
|
||||
|
@ -380,7 +380,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* See the class description for the special cases of this parameter.
|
||||
* @param startTime The daylight saving time starting time in local wall clock
|
||||
* time, which is local standard time in this case.
|
||||
* @exception IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
|
||||
* @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
|
||||
* <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range
|
||||
*/
|
||||
public void setStartRule(int startMonth, int startDay, int startDayOfWeek, int startTime)
|
||||
|
@ -406,7 +406,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param startTime The daylight saving time starting time in local wall clock
|
||||
* time, which is local standard time in this case.
|
||||
* See the class description for the special cases of this parameter.
|
||||
* @exception IllegalArgumentException if the <code>startMonth</code>,
|
||||
* @throws IllegalArgumentException if the <code>startMonth</code>,
|
||||
* <code>startDayOfMonth</code>, or <code>startTime</code> parameters are out of range
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -429,7 +429,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* <em>after</em> <code>dayOfMonth</code>. If false, this rule
|
||||
* selects the last <code>dayOfWeek</code> on or <em>before</em>
|
||||
* <code>dayOfMonth</code>.
|
||||
* @exception IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
|
||||
* @throws IllegalArgumentException if the <code>startMonth</code>, <code>startDay</code>,
|
||||
* <code>startDayOfWeek</code>, or <code>startTime</code> parameters are out of range
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -460,7 +460,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param endTime The daylight saving ending time in local wall clock time,
|
||||
* (in milliseconds within the day) which is local daylight
|
||||
* time in this case.
|
||||
* @exception IllegalArgumentException if the <code>endMonth</code>, <code>endDay</code>,
|
||||
* @throws IllegalArgumentException if the <code>endMonth</code>, <code>endDay</code>,
|
||||
* <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range
|
||||
*/
|
||||
public void setEndRule(int endMonth, int endDay, int endDayOfWeek,
|
||||
|
@ -487,7 +487,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param endTime The daylight saving ending time in local wall clock time,
|
||||
* (in milliseconds within the day) which is local daylight
|
||||
* time in this case.
|
||||
* @exception IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
|
||||
* @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
|
||||
* or <code>endTime</code> parameters are out of range
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -512,7 +512,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* or <em>after</em> <code>endDay</code>. If false, this rule
|
||||
* selects the last <code>endDayOfWeek</code> on or before
|
||||
* <code>endDay</code> of the month.
|
||||
* @exception IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
|
||||
* @throws IllegalArgumentException the <code>endMonth</code>, <code>endDay</code>,
|
||||
* <code>endDayOfWeek</code>, or <code>endTime</code> parameters are out of range
|
||||
* @since 1.2
|
||||
*/
|
||||
|
@ -597,7 +597,7 @@ public class SimpleTimeZone extends TimeZone {
|
|||
* @param dayOfWeek The day-of-week of the given date.
|
||||
* @param millis The milliseconds in day in <em>standard</em> local time.
|
||||
* @return The milliseconds to add to UTC to get local time.
|
||||
* @exception IllegalArgumentException the <code>era</code>,
|
||||
* @throws IllegalArgumentException the <code>era</code>,
|
||||
* <code>month</code>, <code>day</code>, <code>dayOfWeek</code>,
|
||||
* or <code>millis</code> parameters are out of range
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2004, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -189,7 +189,7 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
* @param delim the delimiters.
|
||||
* @param returnDelims flag indicating whether to return the delimiters
|
||||
* as tokens.
|
||||
* @exception NullPointerException if str is {@code null}
|
||||
* @throws NullPointerException if str is {@code null}
|
||||
*/
|
||||
public StringTokenizer(String str, String delim, boolean returnDelims) {
|
||||
currentPosition = 0;
|
||||
|
@ -215,7 +215,7 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
*
|
||||
* @param str a string to be parsed.
|
||||
* @param delim the delimiters.
|
||||
* @exception NullPointerException if str is {@code null}
|
||||
* @throws NullPointerException if str is {@code null}
|
||||
*/
|
||||
public StringTokenizer(String str, String delim) {
|
||||
this(str, delim, false);
|
||||
|
@ -230,7 +230,7 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
* not be treated as tokens.
|
||||
*
|
||||
* @param str a string to be parsed.
|
||||
* @exception NullPointerException if str is {@code null}
|
||||
* @throws NullPointerException if str is {@code null}
|
||||
*/
|
||||
public StringTokenizer(String str) {
|
||||
this(str, " \t\n\r\f", false);
|
||||
|
@ -328,7 +328,7 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
* Returns the next token from this string tokenizer.
|
||||
*
|
||||
* @return the next token from this string tokenizer.
|
||||
* @exception NoSuchElementException if there are no more tokens in this
|
||||
* @throws NoSuchElementException if there are no more tokens in this
|
||||
* tokenizer's string.
|
||||
*/
|
||||
public String nextToken() {
|
||||
|
@ -363,9 +363,9 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
*
|
||||
* @param delim the new delimiters.
|
||||
* @return the next token, after switching to the new delimiter set.
|
||||
* @exception NoSuchElementException if there are no more tokens in this
|
||||
* @throws NoSuchElementException if there are no more tokens in this
|
||||
* tokenizer's string.
|
||||
* @exception NullPointerException if delim is {@code null}
|
||||
* @throws NullPointerException if delim is {@code null}
|
||||
*/
|
||||
public String nextToken(String delim) {
|
||||
delimiters = delim;
|
||||
|
@ -398,7 +398,7 @@ class StringTokenizer implements Enumeration<Object> {
|
|||
* {@code Enumeration} interface.
|
||||
*
|
||||
* @return the next token in the string.
|
||||
* @exception NoSuchElementException if there are no more tokens in this
|
||||
* @throws NoSuchElementException if there are no more tokens in this
|
||||
* tokenizer's string.
|
||||
* @see java.util.Enumeration
|
||||
* @see java.util.StringTokenizer#nextToken()
|
||||
|
|
|
@ -329,7 +329,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
|
|||
*
|
||||
* @param locale the locale in which to supply the display name.
|
||||
* @return the human-readable name of this time zone in the given locale.
|
||||
* @exception NullPointerException if {@code locale} is {@code null}.
|
||||
* @throws NullPointerException if {@code locale} is {@code null}.
|
||||
* @since 1.2
|
||||
* @see #getDisplayName(boolean, int, Locale)
|
||||
*/
|
||||
|
@ -354,7 +354,7 @@ public abstract class TimeZone implements Serializable, Cloneable {
|
|||
* {@code false} specifying a Standard Time name
|
||||
* @param style either {@link #LONG} or {@link #SHORT}
|
||||
* @return the human-readable name of this time zone in the default locale.
|
||||
* @exception IllegalArgumentException if {@code style} is invalid.
|
||||
* @throws IllegalArgumentException if {@code style} is invalid.
|
||||
* @since 1.2
|
||||
* @see #getDisplayName(boolean, int, Locale)
|
||||
* @see Locale#getDefault(Locale.Category)
|
||||
|
@ -389,8 +389,8 @@ public abstract class TimeZone implements Serializable, Cloneable {
|
|||
* @param style either {@link #LONG} or {@link #SHORT}
|
||||
* @param locale the locale in which to supply the display name.
|
||||
* @return the human-readable name of this time zone in the given locale.
|
||||
* @exception IllegalArgumentException if {@code style} is invalid.
|
||||
* @exception NullPointerException if {@code locale} is {@code null}.
|
||||
* @throws IllegalArgumentException if {@code style} is invalid.
|
||||
* @throws NullPointerException if {@code locale} is {@code null}.
|
||||
* @since 1.2
|
||||
* @see java.text.DateFormatSymbols#getZoneStrings()
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -148,7 +148,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
|
|||
* @param name the attribute name
|
||||
* @param value the attribute value
|
||||
* @return the previous value of the attribute, or null if none
|
||||
* @exception ClassCastException if the name is not a Attributes.Name
|
||||
* @throws ClassCastException if the name is not a Attributes.Name
|
||||
* or the value is not a String
|
||||
*/
|
||||
public Object put(Object name, Object value) {
|
||||
|
@ -169,7 +169,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
|
|||
* @param name the attribute name as a string
|
||||
* @param value the attribute value
|
||||
* @return the previous value of the attribute, or null if none
|
||||
* @exception IllegalArgumentException if the attribute name is invalid
|
||||
* @throws IllegalArgumentException if the attribute name is invalid
|
||||
*/
|
||||
public String putValue(String name, String value) {
|
||||
return (String)put(Name.of(name), value);
|
||||
|
@ -213,7 +213,7 @@ public class Attributes implements Map<Object,Object>, Cloneable {
|
|||
* Attributes to this Map. Duplicate mappings will be replaced.
|
||||
*
|
||||
* @param attr the Attributes to be stored in this map
|
||||
* @exception ClassCastException if attr is not an Attributes
|
||||
* @throws ClassCastException if attr is not an Attributes
|
||||
*/
|
||||
public void putAll(Map<?,?> attr) {
|
||||
// ## javac bug?
|
||||
|
@ -470,9 +470,9 @@ public class Attributes implements Map<Object,Object>, Cloneable {
|
|||
* Constructs a new attribute name using the given string name.
|
||||
*
|
||||
* @param name the attribute string name
|
||||
* @exception IllegalArgumentException if the attribute name was
|
||||
* @throws IllegalArgumentException if the attribute name was
|
||||
* invalid
|
||||
* @exception NullPointerException if the attribute name was null
|
||||
* @throws NullPointerException if the attribute name was null
|
||||
*/
|
||||
public Name(String name) {
|
||||
this.hashCode = hash(name);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -46,8 +46,8 @@ class JarEntry extends ZipEntry {
|
|||
* entry name.
|
||||
*
|
||||
* @param name the JAR file entry name
|
||||
* @exception NullPointerException if the entry name is <code>null</code>
|
||||
* @exception IllegalArgumentException if the entry name is longer than
|
||||
* @throws NullPointerException if the entry name is <code>null</code>
|
||||
* @throws IllegalArgumentException if the entry name is longer than
|
||||
* 0xFFFF bytes.
|
||||
*/
|
||||
public JarEntry(String name) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -56,7 +56,7 @@ class JarInputStream extends ZipInputStream {
|
|||
* manifest. If a manifest is present, also attempts to verify
|
||||
* the signatures if the JarInputStream is signed.
|
||||
* @param in the actual input stream
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public JarInputStream(InputStream in) throws IOException {
|
||||
this(in, true);
|
||||
|
@ -70,7 +70,7 @@ class JarInputStream extends ZipInputStream {
|
|||
* @param in the actual input stream
|
||||
* @param verify whether or not to verify the JarInputStream if
|
||||
* it is signed.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public JarInputStream(InputStream in, boolean verify) throws IOException {
|
||||
super(in);
|
||||
|
@ -131,9 +131,9 @@ class JarInputStream extends ZipInputStream {
|
|||
* beginning of the entry data. If verification has been enabled,
|
||||
* any invalid signature detected while positioning the stream for
|
||||
* the next entry will result in an exception.
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception SecurityException if any of the jar file entries
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws SecurityException if any of the jar file entries
|
||||
* are incorrectly signed.
|
||||
*/
|
||||
public ZipEntry getNextEntry() throws IOException {
|
||||
|
@ -170,9 +170,9 @@ class JarInputStream extends ZipInputStream {
|
|||
* any invalid signature detected while positioning the stream for
|
||||
* the next entry will result in an exception.
|
||||
* @return the next JAR file entry, or null if there are no more entries
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception SecurityException if any of the jar file entries
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws SecurityException if any of the jar file entries
|
||||
* are incorrectly signed.
|
||||
*/
|
||||
public JarEntry getNextJarEntry() throws IOException {
|
||||
|
@ -192,13 +192,13 @@ class JarInputStream extends ZipInputStream {
|
|||
* @param len the maximum number of bytes to read
|
||||
* @return the actual number of bytes read, or -1 if the end of the
|
||||
* entry is reached
|
||||
* @exception NullPointerException If <code>b</code> is <code>null</code>.
|
||||
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* @throws NullPointerException If <code>b</code> is <code>null</code>.
|
||||
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* <code>len</code> is negative, or <code>len</code> is greater than
|
||||
* <code>b.length - off</code>
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception SecurityException if any of the jar file entries
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws SecurityException if any of the jar file entries
|
||||
* are incorrectly signed.
|
||||
*/
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -52,7 +52,7 @@ class JarOutputStream extends ZipOutputStream {
|
|||
*
|
||||
* @param out the actual output stream
|
||||
* @param man the optional <code>Manifest</code>
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public JarOutputStream(OutputStream out, Manifest man) throws IOException {
|
||||
super(out);
|
||||
|
@ -68,7 +68,7 @@ class JarOutputStream extends ZipOutputStream {
|
|||
/**
|
||||
* Creates a new <code>JarOutputStream</code> with no manifest.
|
||||
* @param out the actual output stream
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public JarOutputStream(OutputStream out) throws IOException {
|
||||
super(out);
|
||||
|
@ -83,8 +83,8 @@ class JarOutputStream extends ZipOutputStream {
|
|||
* time.
|
||||
*
|
||||
* @param ze the ZIP/JAR entry to be written
|
||||
* @exception ZipException if a ZIP error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void putNextEntry(ZipEntry ze) throws IOException {
|
||||
if (firstEntry) {
|
||||
|
|
|
@ -195,7 +195,7 @@ public class Manifest implements Cloneable {
|
|||
* MainAttributes prior to invoking this method.
|
||||
*
|
||||
* @param out the output stream
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @see #getMainAttributes
|
||||
*/
|
||||
public void write(OutputStream out) throws IOException {
|
||||
|
@ -276,7 +276,7 @@ public class Manifest implements Cloneable {
|
|||
* manifest entries.
|
||||
*
|
||||
* @param is the input stream
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void read(InputStream is) throws IOException {
|
||||
read(is, null);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -554,7 +554,7 @@ public abstract class Pack200 {
|
|||
* Closes its input but not its output. (Pack200 archives are appendable.)
|
||||
* @param in a JarFile
|
||||
* @param out an OutputStream
|
||||
* @exception IOException if an error is encountered.
|
||||
* @throws IOException if an error is encountered.
|
||||
*/
|
||||
void pack(JarFile in, OutputStream out) throws IOException ;
|
||||
|
||||
|
@ -570,7 +570,7 @@ public abstract class Pack200 {
|
|||
* @see #DEFLATE_HINT
|
||||
* @param in a JarInputStream
|
||||
* @param out an OutputStream
|
||||
* @exception IOException if an error is encountered.
|
||||
* @throws IOException if an error is encountered.
|
||||
*/
|
||||
void pack(JarInputStream in, OutputStream out) throws IOException ;
|
||||
}
|
||||
|
@ -673,7 +673,7 @@ public abstract class Pack200 {
|
|||
* Closes its input but not its output. (The output can accumulate more elements.)
|
||||
* @param in an InputStream.
|
||||
* @param out a JarOutputStream.
|
||||
* @exception IOException if an error is encountered.
|
||||
* @throws IOException if an error is encountered.
|
||||
*/
|
||||
void unpack(InputStream in, JarOutputStream out) throws IOException;
|
||||
|
||||
|
@ -684,7 +684,7 @@ public abstract class Pack200 {
|
|||
* Does not close its output. (The output can accumulate more elements.)
|
||||
* @param in a File.
|
||||
* @param out a JarOutputStream.
|
||||
* @exception IOException if an error is encountered.
|
||||
* @throws IOException if an error is encountered.
|
||||
*/
|
||||
void unpack(File in, JarOutputStream out) throws IOException;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -1803,4 +1803,4 @@ public final class Matcher implements MatchResult {
|
|||
throw new IllegalArgumentException("No group with name <" + name + ">");
|
||||
return parentPattern.namedGroups().get(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -63,9 +63,9 @@ public abstract class CurrencyNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the symbol of the given currency code for the specified locale, or null if
|
||||
* the symbol is not available for the locale
|
||||
* @exception NullPointerException if <code>currencyCode</code> or
|
||||
* @throws NullPointerException if <code>currencyCode</code> or
|
||||
* <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>currencyCode</code> is not in
|
||||
* @throws IllegalArgumentException if <code>currencyCode</code> is not in
|
||||
* the form of three upper-case letters, or <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
|
@ -84,12 +84,12 @@ public abstract class CurrencyNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the name for the currency that is appropriate for display to the
|
||||
* user, or null if the name is not available for the locale
|
||||
* @exception IllegalArgumentException if <code>currencyCode</code> is not in
|
||||
* @throws IllegalArgumentException if <code>currencyCode</code> is not in
|
||||
* the form of three upper-case letters, or <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>currencyCode</code> or
|
||||
* @throws NullPointerException if <code>currencyCode</code> or
|
||||
* <code>locale</code> is <code>null</code>
|
||||
* @since 1.7
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -59,8 +59,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the name of the given language code for the specified locale, or null if it's not
|
||||
* available.
|
||||
* @exception NullPointerException if <code>languageCode</code> or <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>languageCode</code> is not in the form of
|
||||
* @throws NullPointerException if <code>languageCode</code> or <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>languageCode</code> is not in the form of
|
||||
* two or three lower-case letters, or <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
|
@ -86,8 +86,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the name of the given script code for the specified locale, or null if it's not
|
||||
* available.
|
||||
* @exception NullPointerException if <code>scriptCode</code> or <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>scriptCode</code> is not in the form of
|
||||
* @throws NullPointerException if <code>scriptCode</code> or <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>scriptCode</code> is not in the form of
|
||||
* four title case letters, or <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
|
@ -115,8 +115,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the name of the given country code for the specified locale, or null if it's not
|
||||
* available.
|
||||
* @exception NullPointerException if <code>countryCode</code> or <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>countryCode</code> is not in the form of
|
||||
* @throws NullPointerException if <code>countryCode</code> or <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>countryCode</code> is not in the form of
|
||||
* two upper-case letters or three digit letters, or <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
|
@ -134,8 +134,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the name of the given variant string for the specified locale, or null if it's not
|
||||
* available.
|
||||
* @exception NullPointerException if <code>variant</code> or <code>locale</code> is null
|
||||
* @exception IllegalArgumentException if <code>locale</code> isn't
|
||||
* @throws NullPointerException if <code>variant</code> or <code>locale</code> is null
|
||||
* @throws IllegalArgumentException if <code>locale</code> isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -154,8 +154,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale, not null.
|
||||
* @return the name of the given key string for the specified locale,
|
||||
* or null if it's not available.
|
||||
* @exception NullPointerException if {@code key} or {@code locale} is null
|
||||
* @exception IllegalArgumentException if {@code locale} isn't
|
||||
* @throws NullPointerException if {@code key} or {@code locale} is null
|
||||
* @throws IllegalArgumentException if {@code locale} isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
@ -179,8 +179,8 @@ public abstract class LocaleNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale, not null.
|
||||
* @return the name of the given type string for the specified locale,
|
||||
* or null if it's not available.
|
||||
* @exception NullPointerException if {@code key}, {@code type} or {@code locale} is null
|
||||
* @exception IllegalArgumentException if {@code locale} isn't
|
||||
* @throws NullPointerException if {@code key}, {@code type} or {@code locale} is null
|
||||
* @throws IllegalArgumentException if {@code locale} isn't
|
||||
* one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -68,11 +68,11 @@ public abstract class TimeZoneNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the human-readable name of the given time zone in the
|
||||
* given locale, or null if it's not available.
|
||||
* @exception IllegalArgumentException if <code>style</code> is invalid,
|
||||
* @throws IllegalArgumentException if <code>style</code> is invalid,
|
||||
* or <code>locale</code> isn't one of the locales returned from
|
||||
* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>ID</code> or <code>locale</code>
|
||||
* @throws NullPointerException if <code>ID</code> or <code>locale</code>
|
||||
* is null
|
||||
* @see java.util.TimeZone#getDisplayName(boolean, int, java.util.Locale)
|
||||
*/
|
||||
|
@ -96,11 +96,11 @@ public abstract class TimeZoneNameProvider extends LocaleServiceProvider {
|
|||
* @param locale the desired locale
|
||||
* @return the human-readable generic name of the given time zone in the
|
||||
* given locale, or {@code null} if it's not available.
|
||||
* @exception IllegalArgumentException if <code>style</code> is invalid,
|
||||
* @throws IllegalArgumentException if <code>style</code> is invalid,
|
||||
* or <code>locale</code> isn't one of the locales returned from
|
||||
* {@link LocaleServiceProvider#getAvailableLocales()
|
||||
* getAvailableLocales()}.
|
||||
* @exception NullPointerException if <code>ID</code> or <code>locale</code>
|
||||
* @throws NullPointerException if <code>ID</code> or <code>locale</code>
|
||||
* is {@code null}
|
||||
* @since 1.8
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -54,7 +54,7 @@ class CheckedInputStream extends FilterInputStream {
|
|||
/**
|
||||
* Reads a byte. Will block if no input is available.
|
||||
* @return the byte read, or -1 if the end of the stream is reached.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public int read() throws IOException {
|
||||
int b = in.read();
|
||||
|
@ -73,11 +73,11 @@ class CheckedInputStream extends FilterInputStream {
|
|||
* @param len the maximum number of bytes read
|
||||
* @return the actual number of bytes read, or -1 if the end
|
||||
* of the stream is reached.
|
||||
* @exception NullPointerException If <code>buf</code> is <code>null</code>.
|
||||
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* @throws NullPointerException If <code>buf</code> is <code>null</code>.
|
||||
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* <code>len</code> is negative, or <code>len</code> is greater than
|
||||
* <code>buf.length - off</code>
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public int read(byte[] buf, int off, int len) throws IOException {
|
||||
len = in.read(buf, off, len);
|
||||
|
@ -91,7 +91,7 @@ class CheckedInputStream extends FilterInputStream {
|
|||
* Skips specified number of bytes of input.
|
||||
* @param n the number of bytes to skip
|
||||
* @return the actual number of bytes skipped
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public long skip(long n) throws IOException {
|
||||
byte[] buf = new byte[512];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 1999, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -55,7 +55,7 @@ class CheckedOutputStream extends FilterOutputStream {
|
|||
/**
|
||||
* Writes a byte. Will block until the byte is actually written.
|
||||
* @param b the byte to be written
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void write(int b) throws IOException {
|
||||
out.write(b);
|
||||
|
@ -68,7 +68,7 @@ class CheckedOutputStream extends FilterOutputStream {
|
|||
* @param b the data to be written
|
||||
* @param off the start offset of the data
|
||||
* @param len the number of bytes to be written
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
out.write(b, off, len);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -364,7 +364,7 @@ public class Deflater {
|
|||
* effect only after that invocation.
|
||||
*
|
||||
* @param strategy the new compression strategy
|
||||
* @exception IllegalArgumentException if the compression strategy is
|
||||
* @throws IllegalArgumentException if the compression strategy is
|
||||
* invalid
|
||||
*/
|
||||
public void setStrategy(int strategy) {
|
||||
|
@ -393,7 +393,7 @@ public class Deflater {
|
|||
* take effect only after that invocation.
|
||||
*
|
||||
* @param level the new compression level (0-9)
|
||||
* @exception IllegalArgumentException if the compression level is invalid
|
||||
* @throws IllegalArgumentException if the compression level is invalid
|
||||
*/
|
||||
public void setLevel(int level) {
|
||||
if ((level < 0 || level > 9) && level != DEFAULT_COMPRESSION) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -101,7 +101,7 @@ class DeflaterOutputStream extends FilterOutputStream {
|
|||
* @param out the output stream
|
||||
* @param def the compressor ("deflater")
|
||||
* @param size the output buffer size
|
||||
* @exception IllegalArgumentException if {@code size <= 0}
|
||||
* @throws IllegalArgumentException if {@code size <= 0}
|
||||
*/
|
||||
public DeflaterOutputStream(OutputStream out, Deflater def, int size) {
|
||||
this(out, def, size, false);
|
||||
|
@ -180,7 +180,7 @@ class DeflaterOutputStream extends FilterOutputStream {
|
|||
* Writes a byte to the compressed output stream. This method will
|
||||
* block until the byte can be written.
|
||||
* @param b the byte to be written
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void write(int b) throws IOException {
|
||||
byte[] buf = new byte[1];
|
||||
|
@ -194,7 +194,7 @@ class DeflaterOutputStream extends FilterOutputStream {
|
|||
* @param b the data to be written
|
||||
* @param off the start offset of the data
|
||||
* @param len the length of the data
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void write(byte[] b, int off, int len) throws IOException {
|
||||
if (def.finished()) {
|
||||
|
@ -217,7 +217,7 @@ class DeflaterOutputStream extends FilterOutputStream {
|
|||
* Finishes writing compressed data to the output stream without closing
|
||||
* the underlying stream. Use this method when applying multiple filters
|
||||
* in succession to the same output stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void finish() throws IOException {
|
||||
if (!def.finished()) {
|
||||
|
@ -231,7 +231,7 @@ class DeflaterOutputStream extends FilterOutputStream {
|
|||
/**
|
||||
* Writes remaining compressed data to the output stream and closes the
|
||||
* underlying stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -69,10 +69,10 @@ class GZIPInputStream extends InflaterInputStream {
|
|||
* @param in the input stream
|
||||
* @param size the input buffer size
|
||||
*
|
||||
* @exception ZipException if a GZIP format error has occurred or the
|
||||
* @throws ZipException if a GZIP format error has occurred or the
|
||||
* compression method used is unsupported
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception IllegalArgumentException if {@code size <= 0}
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws IllegalArgumentException if {@code size <= 0}
|
||||
*/
|
||||
public GZIPInputStream(InputStream in, int size) throws IOException {
|
||||
super(in, new Inflater(true), size);
|
||||
|
@ -84,9 +84,9 @@ class GZIPInputStream extends InflaterInputStream {
|
|||
* Creates a new input stream with a default buffer size.
|
||||
* @param in the input stream
|
||||
*
|
||||
* @exception ZipException if a GZIP format error has occurred or the
|
||||
* @throws ZipException if a GZIP format error has occurred or the
|
||||
* compression method used is unsupported
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public GZIPInputStream(InputStream in) throws IOException {
|
||||
this(in, 512);
|
||||
|
@ -102,12 +102,12 @@ class GZIPInputStream extends InflaterInputStream {
|
|||
* @return the actual number of bytes read, or -1 if the end of the
|
||||
* compressed input stream is reached
|
||||
*
|
||||
* @exception NullPointerException If <code>buf</code> is <code>null</code>.
|
||||
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* @throws NullPointerException If <code>buf</code> is <code>null</code>.
|
||||
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* <code>len</code> is negative, or <code>len</code> is greater than
|
||||
* <code>buf.length - off</code>
|
||||
* @exception ZipException if the compressed input data is corrupt.
|
||||
* @exception IOException if an I/O error has occurred.
|
||||
* @throws ZipException if the compressed input data is corrupt.
|
||||
* @throws IOException if an I/O error has occurred.
|
||||
*
|
||||
*/
|
||||
public int read(byte[] buf, int off, int len) throws IOException {
|
||||
|
@ -130,7 +130,7 @@ class GZIPInputStream extends InflaterInputStream {
|
|||
/**
|
||||
* Closes this input stream and releases any system resources associated
|
||||
* with the stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -61,8 +61,8 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
*
|
||||
* @param out the output stream
|
||||
* @param size the output buffer size
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @exception IllegalArgumentException if {@code size <= 0}
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
* @throws IllegalArgumentException if {@code size <= 0}
|
||||
*/
|
||||
public GZIPOutputStream(OutputStream out, int size) throws IOException {
|
||||
this(out, size, false);
|
||||
|
@ -80,8 +80,8 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
* this instance flushes the compressor with flush mode
|
||||
* {@link Deflater#SYNC_FLUSH} before flushing the output
|
||||
* stream, otherwise only flushes the output stream
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @exception IllegalArgumentException if {@code size <= 0}
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
* @throws IllegalArgumentException if {@code size <= 0}
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
|
@ -104,7 +104,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
* the 2-argument constructor GZIPOutputStream(out, false).
|
||||
*
|
||||
* @param out the output stream
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public GZIPOutputStream(OutputStream out) throws IOException {
|
||||
this(out, 512, false);
|
||||
|
@ -122,7 +122,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
* {@link Deflater#SYNC_FLUSH} before flushing the output
|
||||
* stream, otherwise only flushes the output stream
|
||||
*
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*
|
||||
* @since 1.7
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
* @param buf the data to be written
|
||||
* @param off the start offset of the data
|
||||
* @param len the length of the data
|
||||
* @exception IOException If an I/O error has occurred.
|
||||
* @throws IOException If an I/O error has occurred.
|
||||
*/
|
||||
public synchronized void write(byte[] buf, int off, int len)
|
||||
throws IOException
|
||||
|
@ -151,7 +151,7 @@ class GZIPOutputStream extends DeflaterOutputStream {
|
|||
* Finishes writing compressed data to the output stream without closing
|
||||
* the underlying stream. Use this method when applying multiple filters
|
||||
* in succession to the same output stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void finish() throws IOException {
|
||||
if (!def.finished()) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -76,7 +76,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* @param in the input stream
|
||||
* @param inf the decompressor ("inflater")
|
||||
* @param size the input buffer size
|
||||
* @exception IllegalArgumentException if {@code size <= 0}
|
||||
* @throws IllegalArgumentException if {@code size <= 0}
|
||||
*/
|
||||
public InflaterInputStream(InputStream in, Inflater inf, int size) {
|
||||
super(in);
|
||||
|
@ -116,7 +116,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* Reads a byte of uncompressed data. This method will block until
|
||||
* enough input is available for decompression.
|
||||
* @return the byte read, or -1 if end of compressed input is reached
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public int read() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -132,12 +132,12 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* @param len the maximum number of bytes read
|
||||
* @return the actual number of bytes read, or -1 if the end of the
|
||||
* compressed input is reached or a preset dictionary is needed
|
||||
* @exception NullPointerException If <code>b</code> is <code>null</code>.
|
||||
* @exception IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* @throws NullPointerException If <code>b</code> is <code>null</code>.
|
||||
* @throws IndexOutOfBoundsException If <code>off</code> is negative,
|
||||
* <code>len</code> is negative, or <code>len</code> is greater than
|
||||
* <code>b.length - off</code>
|
||||
* @exception ZipException if a ZIP format error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP format error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -173,7 +173,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* of bytes that could be read without blocking.
|
||||
*
|
||||
* @return 1 before EOF and 0 after EOF.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*
|
||||
*/
|
||||
public int available() throws IOException {
|
||||
|
@ -195,8 +195,8 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* Skips specified number of bytes of uncompressed data.
|
||||
* @param n the number of bytes to skip
|
||||
* @return the actual number of bytes skipped.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception IllegalArgumentException if {@code n < 0}
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws IllegalArgumentException if {@code n < 0}
|
||||
*/
|
||||
public long skip(long n) throws IOException {
|
||||
if (n < 0) {
|
||||
|
@ -223,7 +223,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
/**
|
||||
* Closes this input stream and releases any system resources associated
|
||||
* with the stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
|
@ -236,7 +236,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
|
||||
/**
|
||||
* Fills input buffer with more data to decompress.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
protected void fill() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -283,7 +283,7 @@ class InflaterInputStream extends FilterInputStream {
|
|||
* <code>InflaterInputStream</code> does nothing except throw an
|
||||
* <code>IOException</code>.
|
||||
*
|
||||
* @exception IOException if this method is invoked.
|
||||
* @throws IOException if this method is invoked.
|
||||
* @see java.io.InputStream#mark(int)
|
||||
* @see java.io.IOException
|
||||
*/
|
||||
|
|
|
@ -110,8 +110,8 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
* Reads the next ZIP file entry and positions the stream at the
|
||||
* beginning of the entry data.
|
||||
* @return the next ZIP file entry, or null if there are no more entries
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public ZipEntry getNextEntry() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -133,8 +133,8 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
/**
|
||||
* Closes the current ZIP entry and positions the stream for reading the
|
||||
* next entry.
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void closeEntry() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -150,7 +150,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
* of bytes that could be read without blocking.
|
||||
*
|
||||
* @return 1 before EOF and 0 after EOF has reached for current entry.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*
|
||||
*/
|
||||
public int available() throws IOException {
|
||||
|
@ -172,12 +172,12 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
* @param len the maximum number of bytes read
|
||||
* @return the actual number of bytes read, or -1 if the end of the
|
||||
* entry is reached
|
||||
* @exception NullPointerException if <code>b</code> is <code>null</code>.
|
||||
* @exception IndexOutOfBoundsException if <code>off</code> is negative,
|
||||
* @throws NullPointerException if <code>b</code> is <code>null</code>.
|
||||
* @throws IndexOutOfBoundsException if <code>off</code> is negative,
|
||||
* <code>len</code> is negative, or <code>len</code> is greater than
|
||||
* <code>b.length - off</code>
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -231,9 +231,9 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
* Skips specified number of bytes in the current ZIP entry.
|
||||
* @param n the number of bytes to skip
|
||||
* @return the actual number of bytes skipped
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @exception IllegalArgumentException if {@code n < 0}
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
* @throws IllegalArgumentException if {@code n < 0}
|
||||
*/
|
||||
public long skip(long n) throws IOException {
|
||||
if (n < 0) {
|
||||
|
@ -260,7 +260,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
|
|||
/**
|
||||
* Closes this input stream and releases any system resources associated
|
||||
* with the stream.
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -140,8 +140,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
|
||||
/**
|
||||
* Sets the ZIP file comment.
|
||||
* @param comment the comment string
|
||||
* @exception IllegalArgumentException if the length of the specified
|
||||
* @param comment the comment string
|
||||
* @throws IllegalArgumentException if the length of the specified
|
||||
* ZIP file comment is greater than 0xFFFF bytes
|
||||
*/
|
||||
public void setComment(String comment) {
|
||||
|
@ -156,8 +156,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
* Sets the default compression method for subsequent entries. This
|
||||
* default will be used whenever the compression method is not specified
|
||||
* for an individual ZIP file entry, and is initially set to DEFLATED.
|
||||
* @param method the default compression method
|
||||
* @exception IllegalArgumentException if the specified compression method
|
||||
* @param method the default compression method
|
||||
* @throws IllegalArgumentException if the specified compression method
|
||||
* is invalid
|
||||
*/
|
||||
public void setMethod(int method) {
|
||||
|
@ -170,8 +170,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
/**
|
||||
* Sets the compression level for subsequent entries which are DEFLATED.
|
||||
* The default setting is DEFAULT_COMPRESSION.
|
||||
* @param level the compression level (0-9)
|
||||
* @exception IllegalArgumentException if the compression level is invalid
|
||||
* @param level the compression level (0-9)
|
||||
* @throws IllegalArgumentException if the compression level is invalid
|
||||
*/
|
||||
public void setLevel(int level) {
|
||||
def.setLevel(level);
|
||||
|
@ -183,9 +183,9 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
* The default compression method will be used if no compression method
|
||||
* was specified for the entry, and the current time will be used if
|
||||
* the entry has no set modification time.
|
||||
* @param e the ZIP entry to be written
|
||||
* @exception ZipException if a ZIP format error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @param e the ZIP entry to be written
|
||||
* @throws ZipException if a ZIP format error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void putNextEntry(ZipEntry e) throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -242,8 +242,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
/**
|
||||
* Closes the current ZIP entry and positions the stream for writing
|
||||
* the next entry.
|
||||
* @exception ZipException if a ZIP format error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP format error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void closeEntry() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -307,11 +307,11 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
/**
|
||||
* Writes an array of bytes to the current ZIP entry data. This method
|
||||
* will block until all the bytes are written.
|
||||
* @param b the data to be written
|
||||
* @param off the start offset in the data
|
||||
* @param len the number of bytes that are written
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @param b the data to be written
|
||||
* @param off the start offset in the data
|
||||
* @param len the number of bytes that are written
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public synchronized void write(byte[] b, int off, int len)
|
||||
throws IOException
|
||||
|
@ -349,8 +349,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
* Finishes writing the contents of the ZIP output stream without closing
|
||||
* the underlying stream. Use this method when applying multiple filters
|
||||
* in succession to the same output stream.
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O exception has occurred
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O exception has occurred
|
||||
*/
|
||||
public void finish() throws IOException {
|
||||
ensureOpen();
|
||||
|
@ -370,8 +370,8 @@ class ZipOutputStream extends DeflaterOutputStream implements ZipConstants {
|
|||
|
||||
/**
|
||||
* Closes the ZIP output stream as well as the stream being filtered.
|
||||
* @exception ZipException if a ZIP file error has occurred
|
||||
* @exception IOException if an I/O error has occurred
|
||||
* @throws ZipException if a ZIP file error has occurred
|
||||
* @throws IOException if an I/O error has occurred
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
if (!closed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue