1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package net.sf.ediknight.charset;
21
22 import java.nio.charset.Charset;
23 import java.nio.charset.CharsetDecoder;
24 import java.nio.charset.CharsetEncoder;
25
26
27 /***
28 * @author Holger Joest
29 */
30 public final class ISO_646_PT
31 extends Charset {
32
33 private static final String CANONICAL_NAME = "PT";
34
35 private static final String[] ALIASES = {
36
37 "iso-ir-16",
38 "ISO646-PT",
39 "csISO16Portuguese",
40
41 "ISO_646-PT",
42 "ISO-646-PT"
43 };
44
45 private static final String CHARS =
46 "\u0023\u0024\u00A7\u00C3\u00C7\u00D5"
47 + "\u005E\u0060\u00E3\u00E7\u00F5\u00B0";
48
49
50 /***
51 * Constructor.
52 */
53 public ISO_646_PT() {
54 super(CANONICAL_NAME, ALIASES);
55 }
56
57
58 /***
59 * {@inheritDoc}
60 * @see java.nio.charset.Charset#contains(java.nio.charset.Charset)
61 */
62 @Override
63 public boolean contains(Charset cs) {
64 return false;
65 }
66
67
68 /***
69 * {@inheritDoc}
70 * @see java.nio.charset.Charset#newDecoder()
71 */
72 @Override
73 public CharsetDecoder newDecoder() {
74 return new LegacyCharsetDecoder(this, CHARS);
75 }
76
77
78 /***
79 * {@inheritDoc}
80 * @see java.nio.charset.Charset#newEncoder()
81 */
82 @Override
83 public CharsetEncoder newEncoder() {
84 return new LegacyCharsetEncoder(this, CHARS);
85 }
86
87 }
88