src/share/classes/sun/awt/FontDescriptor.java

Print this page
rev 3975 : 4884238: Adds java.nio.charset.StandardCharset to provide static final constants for the standard charsets.

*** 24,33 **** --- 24,34 ---- */ package sun.awt; import java.nio.charset.Charset; import java.nio.charset.CharsetEncoder; + import java.nio.charset.StandardCharset; import sun.nio.cs.HistoricallyNamedCharset; public class FontDescriptor implements Cloneable { static {
*** 102,113 **** public boolean useUnicode() { if (useUnicode && unicodeEncoder == null) { try { this.unicodeEncoder = isLE? ! Charset.forName("UTF_16LE").newEncoder(): ! Charset.forName("UTF_16BE").newEncoder(); } catch (IllegalArgumentException x) {} } return useUnicode; } static boolean isLE; --- 103,114 ---- public boolean useUnicode() { if (useUnicode && unicodeEncoder == null) { try { this.unicodeEncoder = isLE? ! StandardCharset.UTF_16LE.newEncoder(): ! StandardCharset.UTF_16BE.newEncoder(); } catch (IllegalArgumentException x) {} } return useUnicode; } static boolean isLE;