summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/gnu/java/nio/charset/EncodingHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/gnu/java/nio/charset/EncodingHelper.java')
-rw-r--r--libjava/classpath/gnu/java/nio/charset/EncodingHelper.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/libjava/classpath/gnu/java/nio/charset/EncodingHelper.java b/libjava/classpath/gnu/java/nio/charset/EncodingHelper.java
index 033440d5da2..be7b4afe05d 100644
--- a/libjava/classpath/gnu/java/nio/charset/EncodingHelper.java
+++ b/libjava/classpath/gnu/java/nio/charset/EncodingHelper.java
@@ -148,6 +148,17 @@ public class EncodingHelper
throw new UnsupportedEncodingException("Charset "+name+" not found.");
}
}
+
+ /**
+ * Returns the default charset without throwing any exceptions. The default
+ * charset is UTF8.
+ *
+ * @return the default charset
+ */
+ public static Charset getDefaultCharset()
+ {
+ return new UTF_8();
+ }
}
OpenPOWER on IntegriCloud