|
35 | 35 | @GwtCompatible(emulated = true) |
36 | 36 | @ElementTypesAreNonnullByDefault |
37 | 37 | public final class Charsets { |
38 | | - private Charsets() {} |
39 | 38 |
|
40 | 39 | /** |
41 | 40 | * US-ASCII: seven-bit ASCII, the Basic Latin block of the Unicode character set (ISO646-US). |
42 | 41 | * |
43 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
44 | | - * {@link StandardCharsets#US_ASCII} instead. |
45 | | - * |
| 42 | + * @deprecated Use {@link StandardCharsets#US_ASCII} instead. |
46 | 43 | */ |
47 | | - @J2ktIncompatible |
48 | | - @GwtIncompatible // Charset not supported by GWT |
| 44 | + @Deprecated @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT |
49 | 45 | public static final Charset US_ASCII = StandardCharsets.US_ASCII; |
50 | 46 |
|
51 | 47 | /** |
52 | 48 | * ISO-8859-1: ISO Latin Alphabet Number 1 (ISO-LATIN-1). |
53 | 49 | * |
54 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
55 | | - * {@link StandardCharsets#ISO_8859_1} instead. |
56 | | - * |
| 50 | + * @deprecated Use {@link StandardCharsets#ISO_8859_1} instead. |
57 | 51 | */ |
58 | | - public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1; |
| 52 | + @Deprecated public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1; |
59 | 53 |
|
60 | 54 | /** |
61 | 55 | * UTF-8: eight-bit UCS Transformation Format. |
62 | 56 | * |
63 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
64 | | - * {@link StandardCharsets#UTF_8} instead. |
65 | | - * |
| 57 | + * @deprecated Use {@link StandardCharsets#UTF_8} instead. |
66 | 58 | */ |
67 | | - public static final Charset UTF_8 = StandardCharsets.UTF_8; |
| 59 | + @Deprecated public static final Charset UTF_8 = StandardCharsets.UTF_8; |
68 | 60 |
|
69 | 61 | /** |
70 | 62 | * UTF-16BE: sixteen-bit UCS Transformation Format, big-endian byte order. |
71 | 63 | * |
72 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
73 | | - * {@link StandardCharsets#UTF_16BE} instead. |
74 | | - * |
| 64 | + * @deprecated Use {@link StandardCharsets#UTF_16BE} instead. |
75 | 65 | */ |
76 | | - @J2ktIncompatible |
77 | | - @GwtIncompatible // Charset not supported by GWT |
| 66 | + @Deprecated @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT |
78 | 67 | public static final Charset UTF_16BE = StandardCharsets.UTF_16BE; |
79 | 68 |
|
80 | 69 | /** |
81 | 70 | * UTF-16LE: sixteen-bit UCS Transformation Format, little-endian byte order. |
82 | 71 | * |
83 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
84 | | - * {@link StandardCharsets#UTF_16LE} instead. |
85 | | - * |
| 72 | + * @deprecated Use {@link StandardCharsets#UTF_16LE} instead. |
86 | 73 | */ |
87 | | - @J2ktIncompatible |
88 | | - @GwtIncompatible // Charset not supported by GWT |
| 74 | + @Deprecated @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT |
89 | 75 | public static final Charset UTF_16LE = StandardCharsets.UTF_16LE; |
90 | 76 |
|
91 | 77 | /** |
92 | 78 | * UTF-16: sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order |
93 | 79 | * mark. |
94 | 80 | * |
95 | | - * <p><b>Note:</b> this constant is now unnecessary and should be treated as deprecated; use |
96 | | - * {@link StandardCharsets#UTF_16} instead. |
97 | | - * |
| 81 | + * @deprecated Use {@link StandardCharsets#UTF_16} instead. |
98 | 82 | */ |
99 | | - @J2ktIncompatible |
100 | | - @GwtIncompatible // Charset not supported by GWT |
| 83 | + @Deprecated @J2ktIncompatible @GwtIncompatible // Charset not supported by GWT |
101 | 84 | public static final Charset UTF_16 = StandardCharsets.UTF_16; |
102 | 85 |
|
103 | | - /* |
104 | | - * Please do not add new Charset references to this class, unless those character encodings are |
105 | | - * part of the set required to be supported by all Java platform implementations! Any Charsets |
106 | | - * initialized here may cause unexpected delays when this class is loaded. See the Charset |
107 | | - * Javadocs for the list of built-in character encodings. |
108 | | - */ |
| 86 | + private Charsets() {} |
109 | 87 | } |
0 commit comments