diff options
Diffstat (limited to 'gnu/java/nio/charset/EncodingHelper.java')
-rw-r--r-- | gnu/java/nio/charset/EncodingHelper.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gnu/java/nio/charset/EncodingHelper.java b/gnu/java/nio/charset/EncodingHelper.java index 033440d5d..be7b4afe0 100644 --- a/gnu/java/nio/charset/EncodingHelper.java +++ b/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(); + } } |