2003-02-15 Jesse Rosenstock <jmr@ugcs.caltech.edu>
authorJesse Rosenstock <jmr@ugcs.caltech.edu>
Sat, 15 Feb 2003 09:39:51 +0000 (09:39 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Sat, 15 Feb 2003 09:39:51 +0000 (09:39 +0000)
* java/nio/charset/Charset.java
(isRegistered): Fixed method args and implementation.
* java/nio/charset/CharsetEncoder.java
(unmappableCharacterAction): New method.

From-SVN: r62934

libjava/ChangeLog
libjava/java/nio/charset/Charset.java
libjava/java/nio/charset/CharsetEncoder.java

index 785c9bbae63bed496a12709d1cd3c227de8372a4..331f7d00e37955ed856ff36e749c5649370148a6 100644 (file)
@@ -1,3 +1,10 @@
+2003-02-15  Jesse Rosenstock  <jmr@ugcs.caltech.edu>
+
+       * java/nio/charset/Charset.java
+       (isRegistered): Fixed method args and implementation.
+       * java/nio/charset/CharsetEncoder.java
+       (unmappableCharacterAction): New method.
+
 2003-02-15  Michael Koch  <konqueror@gmx.de>
 
        * java/awt/CheckboxMenuItem.java
index cc60c99b9b6a5ec6a56d6daa2b3190c2e90baf31..889267f302f033570228877d86573f76b12edce6 100644 (file)
@@ -187,9 +187,10 @@ public abstract class Charset implements Comparable
     return canonicalName;
   }
 
-  public final boolean isRegistered (String name)
+  public final boolean isRegistered ()
   {
-    return !name.startsWith ("x-") && !name.startsWith ("X-");
+    return (!canonicalName.startsWith ("x-")
+            && !canonicalName.startsWith ("X-"));
   }
 
   public abstract boolean contains (Charset cs);
index dd434a79752e78436fc849685fe0a14715ec0d42..dc1fa99cd93f05ca00032d0d098b9adee0065d88 100644 (file)
@@ -319,6 +319,11 @@ public abstract class CharsetEncoder
     return this;
   }
 
+  public CodingErrorAction unmappableCharacterAction ()
+  {
+    return unmappableCharacterAction;
+  }
+
   public final CharsetEncoder onUnmappableCharacter
     (CodingErrorAction newAction)
   {