19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.nio.cs;
27
28 import java.nio.ByteBuffer;
29 import java.nio.CharBuffer;
30 import java.nio.charset.Charset;
31 import java.nio.charset.CharsetDecoder;
32 import java.nio.charset.CharsetEncoder;
33 import java.nio.charset.CoderResult;
34
35 public class US_ASCII
36 extends Charset
37 implements HistoricallyNamedCharset
38 {
39 public static final US_ASCII INSTANCE = new US_ASCII();
40
41 public US_ASCII() {
42 super("US-ASCII", StandardCharsets.aliases_US_ASCII());
43 }
44
45 public String historicalName() {
46 return "ASCII";
47 }
48
49 public boolean contains(Charset cs) {
50 return (cs instanceof US_ASCII);
51 }
52
53 public CharsetDecoder newDecoder() {
54 return new Decoder(this);
55 }
56
57 public CharsetEncoder newEncoder() {
58 return new Encoder(this);
59 }
60
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package sun.nio.cs;
27
28 import java.nio.ByteBuffer;
29 import java.nio.CharBuffer;
30 import java.nio.charset.Charset;
31 import java.nio.charset.CharsetDecoder;
32 import java.nio.charset.CharsetEncoder;
33 import java.nio.charset.CoderResult;
34
35 public class US_ASCII
36 extends Charset
37 implements HistoricallyNamedCharset
38 {
39 public US_ASCII() {
40 super("US-ASCII", StandardCharsets.aliases_US_ASCII());
41 }
42
43 public String historicalName() {
44 return "ASCII";
45 }
46
47 public boolean contains(Charset cs) {
48 return (cs instanceof US_ASCII);
49 }
50
51 public CharsetDecoder newDecoder() {
52 return new Decoder(this);
53 }
54
55 public CharsetEncoder newEncoder() {
56 return new Encoder(this);
57 }
58
|