1 /*
2  * Copyright (C) 2014 The Android Open Source Project
3  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 only, as
8  * published by the Free Software Foundation.  Oracle designates this
9  * particular file as subject to the "Classpath" exception as provided
10  * by Oracle in the LICENSE file that accompanied this code.
11  *
12  * This code is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15  * version 2 for more details (a copy is included in the LICENSE file that
16  * accompanied this code).
17  *
18  * You should have received a copy of the GNU General Public License version
19  * 2 along with this work; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
23  * or visit www.oracle.com if you need additional information or have any
24  * questions.
25  */
26 
27 package java.nio.charset;
28 
29 import android.compat.annotation.UnsupportedAppUsage;
30 
31 @SuppressWarnings({"unchecked", "deprecation", "all"})
32 public abstract class Charset implements java.lang.Comparable<java.nio.charset.Charset> {
33 
Charset(java.lang.String canonicalName, java.lang.String[] aliases)34     protected Charset(java.lang.String canonicalName, java.lang.String[] aliases) {
35         throw new RuntimeException("Stub!");
36     }
37 
atBugLevel(java.lang.String bl)38     static boolean atBugLevel(java.lang.String bl) {
39         throw new RuntimeException("Stub!");
40     }
41 
checkName(java.lang.String s)42     private static void checkName(java.lang.String s) {
43         throw new RuntimeException("Stub!");
44     }
45 
cache(java.lang.String charsetName, java.nio.charset.Charset cs)46     private static void cache(java.lang.String charsetName, java.nio.charset.Charset cs) {
47         throw new RuntimeException("Stub!");
48     }
49 
providers()50     private static java.util.Iterator<java.nio.charset.spi.CharsetProvider> providers() {
51         throw new RuntimeException("Stub!");
52     }
53 
lookupViaProviders(java.lang.String charsetName)54     private static java.nio.charset.Charset lookupViaProviders(java.lang.String charsetName) {
55         throw new RuntimeException("Stub!");
56     }
57 
lookup(java.lang.String charsetName)58     private static java.nio.charset.Charset lookup(java.lang.String charsetName) {
59         throw new RuntimeException("Stub!");
60     }
61 
lookup2(java.lang.String charsetName)62     private static java.nio.charset.Charset lookup2(java.lang.String charsetName) {
63         throw new RuntimeException("Stub!");
64     }
65 
isSupported(java.lang.String charsetName)66     public static boolean isSupported(java.lang.String charsetName) {
67         throw new RuntimeException("Stub!");
68     }
69 
forName(java.lang.String charsetName)70     public static java.nio.charset.Charset forName(java.lang.String charsetName) {
71         throw new RuntimeException("Stub!");
72     }
73 
forNameUEE(java.lang.String charsetName)74     public static java.nio.charset.Charset forNameUEE(java.lang.String charsetName)
75             throws java.io.UnsupportedEncodingException {
76         throw new RuntimeException("Stub!");
77     }
78 
put( java.util.Iterator<java.nio.charset.Charset> i, java.util.Map<java.lang.String, java.nio.charset.Charset> m)79     private static void put(
80             java.util.Iterator<java.nio.charset.Charset> i,
81             java.util.Map<java.lang.String, java.nio.charset.Charset> m) {
82         throw new RuntimeException("Stub!");
83     }
84 
85     public static java.util.SortedMap<java.lang.String, java.nio.charset.Charset>
availableCharsets()86             availableCharsets() {
87         throw new RuntimeException("Stub!");
88     }
89 
defaultCharset()90     public static java.nio.charset.Charset defaultCharset() {
91         throw new RuntimeException("Stub!");
92     }
93 
name()94     public final java.lang.String name() {
95         throw new RuntimeException("Stub!");
96     }
97 
aliases()98     public final java.util.Set<java.lang.String> aliases() {
99         throw new RuntimeException("Stub!");
100     }
101 
displayName()102     public java.lang.String displayName() {
103         throw new RuntimeException("Stub!");
104     }
105 
isRegistered()106     public final boolean isRegistered() {
107         throw new RuntimeException("Stub!");
108     }
109 
displayName(java.util.Locale locale)110     public java.lang.String displayName(java.util.Locale locale) {
111         throw new RuntimeException("Stub!");
112     }
113 
contains(java.nio.charset.Charset cs)114     public abstract boolean contains(java.nio.charset.Charset cs);
115 
newDecoder()116     public abstract java.nio.charset.CharsetDecoder newDecoder();
117 
newEncoder()118     public abstract java.nio.charset.CharsetEncoder newEncoder();
119 
canEncode()120     public boolean canEncode() {
121         throw new RuntimeException("Stub!");
122     }
123 
decode(java.nio.ByteBuffer bb)124     public final java.nio.CharBuffer decode(java.nio.ByteBuffer bb) {
125         throw new RuntimeException("Stub!");
126     }
127 
encode(java.nio.CharBuffer cb)128     public final java.nio.ByteBuffer encode(java.nio.CharBuffer cb) {
129         throw new RuntimeException("Stub!");
130     }
131 
encode(java.lang.String str)132     public final java.nio.ByteBuffer encode(java.lang.String str) {
133         throw new RuntimeException("Stub!");
134     }
135 
compareTo(java.nio.charset.Charset that)136     public final int compareTo(java.nio.charset.Charset that) {
137         throw new RuntimeException("Stub!");
138     }
139 
hashCode()140     public final int hashCode() {
141         throw new RuntimeException("Stub!");
142     }
143 
equals(java.lang.Object ob)144     public final boolean equals(java.lang.Object ob) {
145         throw new RuntimeException("Stub!");
146     }
147 
toString()148     public final java.lang.String toString() {
149         throw new RuntimeException("Stub!");
150     }
151 
152     private java.util.Set<java.lang.String> aliasSet;
153 
154     private final java.lang.String[] aliases;
155 
156     {
157         aliases = new java.lang.String[0];
158     }
159 
160     private static volatile java.lang.String bugLevel;
161 
162     private static volatile java.util.Map.Entry<java.lang.String, java.nio.charset.Charset> cache1;
163 
164     private static final java.util.HashMap<java.lang.String, java.nio.charset.Charset> cache2;
165 
166     static {
167         cache2 = null;
168     }
169 
170     @UnsupportedAppUsage
171     private static java.nio.charset.Charset defaultCharset;
172 
173     private static java.lang.ThreadLocal<java.lang.ThreadLocal<?>> gate;
174 
175     private final java.lang.String name;
176 
177     {
178         name = null;
179     }
180 }
181