diff options
author | Michael Koch <konqueror@gmx.de> | 2002-11-11 07:12:07 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2002-11-11 07:12:07 +0000 |
commit | ac7bc6bb2f59e4445e6f4469f558a40a913edbe1 (patch) | |
tree | d90f26e4b6f26d7e2282c42fb959a90ad20d8b86 /libjava | |
parent | dba90b0cc605cde06371401c8abf44fc367b1b36 (diff) | |
download | gcc-ac7bc6bb2f59e4445e6f4469f558a40a913edbe1.zip gcc-ac7bc6bb2f59e4445e6f4469f558a40a913edbe1.tar.gz gcc-ac7bc6bb2f59e4445e6f4469f558a40a913edbe1.tar.bz2 |
CharacterCodingException.java: This class must be public.
2002-11-11 Michael Koch <konqueror@gmx.de>
* java/nio/charset/CharacterCodingException.java:
This class must be public.
* java/nio/charset/CoderMalfunctionError.java:
This class must be public.
* java/nio/charset/CodingErrorAction.java:
This class must be public.
* java/nio/charset/IllegalCharsetNameException.java:
This class must be public, better implementation.
* java/nio/charset/MalformedInputException.java:
This class must be public, better implementation.
* java/nio/charset/UnmappableCharacterException.java:
This class must be public, better implementation.
* java/nio/charset/UnsupportedCharsetException.java:
This class must be public, better implementation.
From-SVN: r59012
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 17 | ||||
-rw-r--r-- | libjava/java/nio/charset/CharacterCodingException.java | 5 | ||||
-rw-r--r-- | libjava/java/nio/charset/CoderMalfunctionError.java | 2 | ||||
-rw-r--r-- | libjava/java/nio/charset/CodingErrorAction.java | 26 | ||||
-rw-r--r-- | libjava/java/nio/charset/IllegalCharsetNameException.java | 12 | ||||
-rw-r--r-- | libjava/java/nio/charset/MalformedInputException.java | 8 | ||||
-rw-r--r-- | libjava/java/nio/charset/UnmappableCharacterException.java | 8 | ||||
-rw-r--r-- | libjava/java/nio/charset/UnsupportedCharsetException.java | 12 |
8 files changed, 63 insertions, 27 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 90eaefbf..4ddee78 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,22 @@ 2002-11-11 Michael Koch <konqueror@gmx.de> + * java/nio/charset/CharacterCodingException.java: + This class must be public. + * java/nio/charset/CoderMalfunctionError.java: + This class must be public. + * java/nio/charset/CodingErrorAction.java: + This class must be public. + * java/nio/charset/IllegalCharsetNameException.java: + This class must be public, better implementation. + * java/nio/charset/MalformedInputException.java: + This class must be public, better implementation. + * java/nio/charset/UnmappableCharacterException.java: + This class must be public, better implementation. + * java/nio/charset/UnsupportedCharsetException.java: + This class must be public, better implementation. + +2002-11-11 Michael Koch <konqueror@gmx.de> + * java/nio/BufferOverflowException.java, java/nio/BufferUnderflowException.java: New file. * Makefile.am (ordinary_java_source_files): diff --git a/libjava/java/nio/charset/CharacterCodingException.java b/libjava/java/nio/charset/CharacterCodingException.java index 2fba33e..f6a283b 100644 --- a/libjava/java/nio/charset/CharacterCodingException.java +++ b/libjava/java/nio/charset/CharacterCodingException.java @@ -39,7 +39,10 @@ package java.nio.charset; import java.io.IOException; -class CharacterCodingException extends IOException +/** + * @since 1.4 + */ +public class CharacterCodingException extends IOException { /** * Creates the exception diff --git a/libjava/java/nio/charset/CoderMalfunctionError.java b/libjava/java/nio/charset/CoderMalfunctionError.java index 16c23bf..df57b82 100644 --- a/libjava/java/nio/charset/CoderMalfunctionError.java +++ b/libjava/java/nio/charset/CoderMalfunctionError.java @@ -40,7 +40,7 @@ package java.nio.charset; /** * @since 1.4 */ -class CoderMalfunctionError extends Error +public class CoderMalfunctionError extends Error { /** * Creates the error diff --git a/libjava/java/nio/charset/CodingErrorAction.java b/libjava/java/nio/charset/CodingErrorAction.java index 4631077..1a2e317 100644 --- a/libjava/java/nio/charset/CodingErrorAction.java +++ b/libjava/java/nio/charset/CodingErrorAction.java @@ -37,18 +37,30 @@ exception statement from your version. */ package java.nio.charset; - -class CodingErrorAction +public class CodingErrorAction { - public static final CodingErrorAction IGNORE; - public static final CodingErrorAction REPLACE; - public static final CodingErrorAction REPORT; + public static final CodingErrorAction IGNORE + = new CodingErrorAction("ignore"); + public static final CodingErrorAction REPLACE + = new CodingErrorAction("replace"); + public static final CodingErrorAction REPORT + = new CodingErrorAction("report"); + + private final String name; + + /** + * Private constructor only used to create the constant CodingErrorActions. + */ + private CodingErrorAction(String name) + { + this.name = name; + } /** - * FIXME + * Returns the name of the CodingErrorAction. */ public String toString () { - return ""; + return name; } } diff --git a/libjava/java/nio/charset/IllegalCharsetNameException.java b/libjava/java/nio/charset/IllegalCharsetNameException.java index a3e0593..762eb68 100644 --- a/libjava/java/nio/charset/IllegalCharsetNameException.java +++ b/libjava/java/nio/charset/IllegalCharsetNameException.java @@ -37,17 +37,17 @@ exception statement from your version. */ package java.nio.charset; -class IllegalCharsetNameException extends IllegalArgumentException +/** + * @since 1.4 + */ +public class IllegalCharsetNameException extends IllegalArgumentException { - private String charsetName; - /** * Creates the exception */ public IllegalCharsetNameException (String charsetName) { - super (); - this.charsetName = charsetName; + super (charsetName); } /** @@ -55,6 +55,6 @@ class IllegalCharsetNameException extends IllegalArgumentException */ public String getCharsetName () { - return charsetName; + return getMessage (); } } diff --git a/libjava/java/nio/charset/MalformedInputException.java b/libjava/java/nio/charset/MalformedInputException.java index 2111b79..692eed6 100644 --- a/libjava/java/nio/charset/MalformedInputException.java +++ b/libjava/java/nio/charset/MalformedInputException.java @@ -37,7 +37,10 @@ exception statement from your version. */ package java.nio.charset; -class MalformedInputException extends CharacterCodingException +/** + * @since 1.4 + */ +public class MalformedInputException extends CharacterCodingException { private int inputLength; @@ -63,7 +66,6 @@ class MalformedInputException extends CharacterCodingException */ public String getMessage () { - // FIXME: I think this is not correct - return ""; + return "Input length = " + inputLength; } } diff --git a/libjava/java/nio/charset/UnmappableCharacterException.java b/libjava/java/nio/charset/UnmappableCharacterException.java index f1714b8..5ae4930 100644 --- a/libjava/java/nio/charset/UnmappableCharacterException.java +++ b/libjava/java/nio/charset/UnmappableCharacterException.java @@ -37,7 +37,10 @@ exception statement from your version. */ package java.nio.charset; -class UnmappableCharacterException extends CharacterCodingException +/** + * @since 1.4 + */ +public class UnmappableCharacterException extends CharacterCodingException { private int inputLength; @@ -63,7 +66,6 @@ class UnmappableCharacterException extends CharacterCodingException */ public String getMessage () { - // FIXME: I think this is not correct - return ""; + return "Input length = " + inputLength; } } diff --git a/libjava/java/nio/charset/UnsupportedCharsetException.java b/libjava/java/nio/charset/UnsupportedCharsetException.java index 943164a..13aaa52 100644 --- a/libjava/java/nio/charset/UnsupportedCharsetException.java +++ b/libjava/java/nio/charset/UnsupportedCharsetException.java @@ -37,17 +37,17 @@ exception statement from your version. */ package java.nio.charset; -class UnsupportedCharsetException extends IllegalArgumentException +/** + * @since 1.4 + */ +public class UnsupportedCharsetException extends IllegalArgumentException { - private String charsetName; - /** * Creates the exception */ public UnsupportedCharsetException (String charsetName) { - super (); - this.charsetName = charsetName; + super (charsetName); } /** @@ -55,6 +55,6 @@ class UnsupportedCharsetException extends IllegalArgumentException */ public String getCharsetName () { - return charsetName; + return getMessage (); } } |