mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-28 08:43:22 +01:00
31 lines
908 B
Java
31 lines
908 B
Java
package org.apache.http.util;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.nio.charset.Charset;
|
|
import java.nio.charset.UnsupportedCharsetException;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes11.dex */
|
|
public class CharsetUtils {
|
|
public static Charset get(String str) throws UnsupportedEncodingException {
|
|
if (str == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
return Charset.forName(str);
|
|
} catch (UnsupportedCharsetException unused) {
|
|
throw new UnsupportedEncodingException(str);
|
|
}
|
|
}
|
|
|
|
public static Charset lookup(String str) {
|
|
if (str == null) {
|
|
return null;
|
|
}
|
|
try {
|
|
return Charset.forName(str);
|
|
} catch (UnsupportedCharsetException unused) {
|
|
return null;
|
|
}
|
|
}
|
|
}
|