正在查看: moonshot.企业版 v8.14.46 应用的 C0262.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: moonshot.企业版 v8.14.46 应用的 C0262.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package kp1AiJpjqJHu1Tcnj96z.Bu9YQKH1SoMrhmpeBGto.zSFvmU2XOpXZrEfUxlHp.IRnPlw4EC2IclzeuBbCK;
import android.annotation.SuppressLint;
import com.luck.picture.lib.config.FileSizeUnit;
import com.netease.yunxin.report.sdk.tracker.AbsEventTracker;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class C0262 {
private static final char[] f1963 = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
public static boolean m1692(String str) {
return m1771(m1729(str));
}
public static String m1693(File file, String str) {
BufferedReader bufferedReader;
BufferedReader bufferedReader2 = null;
if (file == null) {
return null;
}
try {
StringBuilder sb = new StringBuilder();
bufferedReader = m1778(str) ? new BufferedReader(new InputStreamReader(new FileInputStream(file))) : new BufferedReader(new InputStreamReader(new FileInputStream(file), str));
while (true) {
try {
try {
String readLine = bufferedReader.readLine();
if (readLine == null) {
String sb2 = sb.delete(sb.length() - 2, sb.length()).toString();
C0252.m1617(bufferedReader);
return sb2;
}
sb.append(readLine);
sb.append("\r\n");
} catch (IOException e) {
e = e;
e.printStackTrace();
C0252.m1617(bufferedReader);
return null;
}
} catch (Throwable th) {
th = th;
bufferedReader2 = bufferedReader;
C0252.m1617(bufferedReader2);
throw th;
}
}
} catch (IOException e2) {
e = e2;
bufferedReader = null;
} catch (Throwable th2) {
th = th2;
C0252.m1617(bufferedReader2);
throw th;
}
}
public static boolean m1694(String str) {
return m1753(m1729(str));
}
public static byte[] m1695(File file) {
if (file == null) {
return null;
}
try {
return m1763(new FileInputStream(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
}
private static boolean m1696(String str, String str2, boolean z) {
return m1760(m1729(str), m1729(str2), z);
}
public static String m1697(File file) {
if (file == null) {
return null;
}
return m1720(file.getPath());
}
public static List<String> m1698(File file, String str) {
return m1779(file, 0, AbsEventTracker.NONE_TIME, str);
}
public static boolean m1699(String str) {
return m1726(m1729(str));
}
private static boolean m1700(String str, String str2, boolean z) {
return m1749(m1729(str), m1729(str2), z);
}
public static long m1701(String str) {
return m1733(m1729(str));
}
public static List<File> m1702(String str, FilenameFilter filenameFilter, boolean z) {
return m1750(m1729(str), filenameFilter, z);
}
public static java.lang.String m1703(java.io.File r5) {
throw new UnsupportedOperationException("Method not decompiled: kp1AiJpjqJHu1Tcnj96z.Bu9YQKH1SoMrhmpeBGto.zSFvmU2XOpXZrEfUxlHp.IRnPlw4EC2IclzeuBbCK.C0262.m1703(java.io.File):java.lang.String");
}
public static boolean m1704(String str, String str2) {
return m1741(m1729(str), m1729(str2));
}
public static boolean m1705(File file) {
if (file == null) {
return false;
}
if (file.exists()) {
return file.isFile();
}
if (!m1775(file.getParentFile())) {
return false;
}
try {
return file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static List<String> m1706(String str, int i, int i2, String str2) {
return m1779(m1729(str), i, i2, str2);
}
public static InputStream m1707(String str) {
File file = new File(str);
if (!file.exists()) {
return null;
}
try {
BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(file));
try {
bufferedInputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
return bufferedInputStream;
} catch (FileNotFoundException e2) {
e2.printStackTrace();
return null;
}
}
public static String m1708(String str) {
return m1767(m1729(str));
}
public static boolean m1709(File file, File file2) {
return m1749(file, file2, false);
}
public static String m1710(String str) {
return m1782(m1778(str) ? null : new File(str));
}
public static String m1711(String str) {
int lastIndexOf;
return (m1778(str) || (lastIndexOf = str.lastIndexOf(File.separator)) == -1) ? str : str.substring(lastIndexOf + 1);
}
@SuppressLint({"DefaultLocale"})
private static String m1712(long j) {
if (j < 0) {
return "shouldn't be less than zero!";
}
if (j < 1024) {
double d = j;
Double.isNaN(d);
return String.format("%.3fB", Double.valueOf(d + 5.0E-4d));
}
if (j < 1048576) {
double d2 = j;
Double.isNaN(d2);
return String.format("%.3fKB", Double.valueOf((d2 / 1024.0d) + 5.0E-4d));
}
if (j < FileSizeUnit.GB) {
double d3 = j;
Double.isNaN(d3);
return String.format("%.3fMB", Double.valueOf((d3 / 1048576.0d) + 5.0E-4d));
}
double d4 = j;
Double.isNaN(d4);
return String.format("%.3fGB", Double.valueOf((d4 / 1.073741824E9d) + 5.0E-4d));
}
public static boolean m1713(String str, String str2) {
return m1759(m1729(str), m1729(str2));
}
public static boolean m1714(File file, String str) {
if (file == null || !file.exists() || m1778(str)) {
return false;
}
if (str.equals(file.getName())) {
return true;
}
File file2 = new File(file.getParent() + File.separator + str);
return !file2.exists() && file.renameTo(file2);
}
public static boolean m1715(String str, String str2) {
return m1728(m1729(str), m1729(str2));
}
public static List<File> m1716(String str, String str2, boolean z) {
return m1743(m1729(str), str2, z);
}
public static long m1717(String str) {
return m1725(m1729(str));
}
public static String m1718(String str) {
if (m1778(str)) {
return str;
}
int lastIndexOf = str.lastIndexOf(File.separator);
return lastIndexOf == -1 ? "" : str.substring(0, lastIndexOf + 1);
}
public static boolean m1719(String str) {
return m1775(m1729(str));
}
public static String m1720(String str) {
if (m1778(str)) {
return str;
}
int lastIndexOf = str.lastIndexOf(46);
int lastIndexOf2 = str.lastIndexOf(File.separator);
return lastIndexOf2 == -1 ? lastIndexOf == -1 ? str : str.substring(0, lastIndexOf) : (lastIndexOf == -1 || lastIndexOf2 > lastIndexOf) ? str.substring(lastIndexOf2 + 1) : str.substring(lastIndexOf2 + 1, lastIndexOf);
}
public static String m1721(File file) {
if (file == null) {
return null;
}
return m1711(file.getPath());
}
public static String m1722(String str, String str2) {
return m1693(m1729(str), str2);
}
public static boolean m1723(File file) {
return file != null && file.exists();
}
public static int m1724(File file) {
int i;
BufferedInputStream bufferedInputStream;
BufferedInputStream bufferedInputStream2 = null;
try {
try {
bufferedInputStream = new BufferedInputStream(new FileInputStream(file));
} catch (IOException e) {
e = e;
}
try {
try {
byte[] bArr = new byte[1024];
i = 1;
while (true) {
try {
int read = bufferedInputStream.read(bArr, 0, 1024);
if (read == -1) {
break;
}
for (int i2 = 0; i2 < read; i2++) {
if (bArr[i2] == 10) {
i++;
}
}
} catch (IOException e2) {
e = e2;
bufferedInputStream2 = bufferedInputStream;
e.printStackTrace();
C0252.m1617(bufferedInputStream2);
return i;
}
}
C0252.m1617(bufferedInputStream);
} catch (Throwable th) {
th = th;
bufferedInputStream2 = bufferedInputStream;
C0252.m1617(bufferedInputStream2);
throw th;
}
} catch (IOException e3) {
e = e3;
bufferedInputStream2 = bufferedInputStream;
i = 1;
e.printStackTrace();
C0252.m1617(bufferedInputStream2);
return i;
}
return i;
} catch (Throwable th2) {
th = th2;
}
}
public static long m1725(File file) {
if (!m1753(file)) {
return -1L;
}
long j = 0;
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
j += file2.isDirectory() ? m1725(file2) : file2.length();
}
}
return j;
}
public static boolean m1726(File file) {
if (file == null) {
return false;
}
if (!file.exists()) {
return true;
}
if (!file.isDirectory()) {
return false;
}
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (file2.isFile()) {
if (!m1740(file2)) {
return false;
}
} else if (file2.isDirectory() && !m1769(file2)) {
return false;
}
}
}
return true;
}
public static boolean m1727(String str) {
return m1705(m1729(str));
}
public static boolean m1728(File file, File file2) {
return m1760(file, file2, true);
}
public static File m1729(String str) {
if (m1778(str)) {
return null;
}
return new File(str);
}
public static String m1730(String str) {
return m1758(m1729(str));
}
public static boolean m1731(String str) {
return m1769(m1729(str));
}
public static String m1732(File file) {
if (file == null) {
return null;
}
return m1738(file.getPath());
}
public static long m1733(File file) {
if (m1771(file)) {
return file.length();
}
return -1L;
}
public static List<File> m1734(String str, String str2) {
return m1737(m1729(str), str2);
}
public static boolean m1735(File file) {
if (file == null) {
return false;
}
if ((file.exists() && file.isFile() && !file.delete()) || !m1775(file.getParentFile())) {
return false;
}
try {
return file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static long m1736(String str) {
return m1768(m1729(str));
}
public static List<File> m1737(File file, String str) {
if (file == null || !m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (file2.getName().toUpperCase().equals(str.toUpperCase())) {
arrayList.add(file2);
}
if (file2.isDirectory()) {
arrayList.addAll(m1737(file2, str));
}
}
}
return arrayList;
}
public static String m1738(String str) {
if (m1778(str)) {
return str;
}
int lastIndexOf = str.lastIndexOf(46);
return (lastIndexOf == -1 || str.lastIndexOf(File.separator) >= lastIndexOf) ? "" : str.substring(lastIndexOf + 1);
}
public static boolean m1739(String str) {
return m1740(m1729(str));
}
public static boolean m1740(File file) {
return file != null && (!file.exists() || (file.isFile() && file.delete()));
}
public static boolean m1741(File file, File file2) {
return m1749(file, file2, true);
}
public static boolean m1742(String str, InputStream inputStream, boolean z) {
return m1755(m1729(str), inputStream, z);
}
public static List<File> m1743(File file, String str, boolean z) {
if (z) {
return m1752(file, str);
}
if (file == null || !m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (file2.getName().toUpperCase().endsWith(str.toUpperCase())) {
arrayList.add(file2);
}
}
}
return arrayList;
}
private static ByteArrayOutputStream m1744(InputStream inputStream) {
if (inputStream == null) {
return null;
}
try {
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] bArr = new byte[1024];
while (true) {
int read = inputStream.read(bArr, 0, 1024);
if (read == -1) {
C0252.m1617(inputStream);
return byteArrayOutputStream;
}
byteArrayOutputStream.write(bArr, 0, read);
}
} catch (IOException e) {
e.printStackTrace();
C0252.m1617(inputStream);
return null;
}
} catch (Throwable th) {
C0252.m1617(inputStream);
throw th;
}
}
public static boolean m1745(String str, String str2, boolean z) {
return m1774(m1729(str), str2, z);
}
public static int m1746(String str) {
return m1724(m1729(str));
}
public static boolean m1747(String str, String str2) {
return m1709(m1729(str), m1729(str2));
}
public static List<File> m1748(File file) {
List<File> m1748;
if (!m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
arrayList.add(file2);
if (file2.isDirectory() && (m1748 = m1748(file2)) != null) {
arrayList.addAll(m1748);
}
}
}
return arrayList;
}
private static boolean m1749(File file, File file2, boolean z) {
if (file == null || file2 == null) {
return false;
}
StringBuilder sb = new StringBuilder();
sb.append(file.getPath());
String str = File.separator;
sb.append(str);
String sb2 = sb.toString();
String str2 = file2.getPath() + str;
if (str2.contains(sb2) || !file.exists() || !file.isDirectory() || !m1775(file2)) {
return false;
}
for (File file3 : file.listFiles()) {
File file4 = new File(str2 + file3.getName());
if (file3.isFile()) {
if (!m1760(file3, file4, z)) {
return false;
}
} else if (file3.isDirectory() && !m1749(file3, file4, z)) {
return false;
}
}
return !z || m1769(file);
}
public static List<File> m1750(File file, FilenameFilter filenameFilter, boolean z) {
if (z) {
return m1777(file, filenameFilter);
}
if (file == null || !m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (filenameFilter.accept(file2.getParentFile(), file2.getName())) {
arrayList.add(file2);
}
}
}
return arrayList;
}
private static String m1751(byte[] bArr) {
int length;
if (bArr == null || (length = bArr.length) <= 0) {
return null;
}
char[] cArr = new char[length << 1];
int i = 0;
for (int i2 = 0; i2 < length; i2++) {
int i3 = i + 1;
char[] cArr2 = f1963;
cArr[i] = cArr2[(bArr[i2] >>> 4) & 15];
i = i3 + 1;
cArr[i3] = cArr2[bArr[i2] & 15];
}
return new String(cArr);
}
public static List<File> m1752(File file, String str) {
if (file == null || !m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (file2.getName().toUpperCase().endsWith(str.toUpperCase())) {
arrayList.add(file2);
}
if (file2.isDirectory()) {
arrayList.addAll(m1752(file2, str));
}
}
}
return arrayList;
}
public static boolean m1753(File file) {
return m1723(file) && file.isDirectory();
}
public static List<File> m1754(File file, boolean z) {
if (!m1753(file)) {
return null;
}
if (z) {
return m1748(file);
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
Collections.addAll(arrayList, listFiles);
}
return arrayList;
}
public static boolean m1755(File file, InputStream inputStream, boolean z) {
BufferedOutputStream bufferedOutputStream;
if (file == null || inputStream == null || !m1705(file)) {
return false;
}
BufferedOutputStream bufferedOutputStream2 = null;
try {
try {
bufferedOutputStream = new BufferedOutputStream(new FileOutputStream(file, z));
} catch (Throwable th) {
th = th;
}
} catch (IOException e) {
e = e;
}
try {
byte[] bArr = new byte[1024];
while (true) {
int read = inputStream.read(bArr, 0, 1024);
if (read == -1) {
C0252.m1617(inputStream, bufferedOutputStream);
return true;
}
bufferedOutputStream.write(bArr, 0, read);
}
} catch (IOException e2) {
e = e2;
bufferedOutputStream2 = bufferedOutputStream;
e.printStackTrace();
C0252.m1617(inputStream, bufferedOutputStream2);
return false;
} catch (Throwable th2) {
th = th2;
bufferedOutputStream2 = bufferedOutputStream;
C0252.m1617(inputStream, bufferedOutputStream2);
throw th;
}
}
public static boolean m1756(String str) {
return m1735(m1729(str));
}
public static byte[] m1757(String str) {
return m1695(m1729(str));
}
public static String m1758(File file) {
long m1725 = m1725(file);
return m1725 == -1 ? "" : m1712(m1725);
}
public static boolean m1759(File file, File file2) {
return m1760(file, file2, false);
}
private static boolean m1760(File file, File file2, boolean z) {
if (file != null && file2 != null && file.exists() && file.isFile()) {
if ((file2.exists() && file2.isFile()) || !m1775(file2.getParentFile())) {
return false;
}
try {
if (!m1755(file2, new FileInputStream(file), false)) {
return false;
}
if (z) {
if (!m1740(file)) {
return false;
}
}
return true;
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
return false;
}
public static byte[] m1761(String str) {
return m1770(m1778(str) ? null : new File(str));
}
public static List<File> m1762(String str, FilenameFilter filenameFilter) {
return m1777(m1729(str), filenameFilter);
}
private static byte[] m1763(InputStream inputStream) {
if (inputStream == null) {
return null;
}
return m1744(inputStream).toByteArray();
}
public static boolean m1764(String str) {
return m1723(m1729(str));
}
public static List<File> m1765(String str) {
return m1748(m1729(str));
}
public static boolean m1766(String str, String str2) {
return m1714(m1729(str), str2);
}
public static String m1767(File file) {
long m1733 = m1733(file);
return m1733 == -1 ? "" : m1712(m1733);
}
public static long m1768(File file) {
if (file == null) {
return -1L;
}
return file.lastModified();
}
public static boolean m1769(File file) {
if (file == null) {
return false;
}
if (!file.exists()) {
return true;
}
if (!file.isDirectory()) {
return false;
}
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (file2.isFile()) {
if (!m1740(file2)) {
return false;
}
} else if (file2.isDirectory() && !m1769(file2)) {
return false;
}
}
}
return file.delete();
}
public static byte[] m1770(File file) {
DigestInputStream digestInputStream;
Closeable closeable;
Closeable closeable2 = null;
if (file == null) {
return null;
}
try {
try {
digestInputStream = new DigestInputStream(new FileInputStream(file), MessageDigest.getInstance("MD5"));
try {
while (digestInputStream.read(new byte[262144]) > 0) {
}
byte[] digest = digestInputStream.getMessageDigest().digest();
C0252.m1617(digestInputStream);
return digest;
} catch (IOException e) {
e = e;
e.printStackTrace();
C0252.m1617(digestInputStream);
return null;
} catch (NoSuchAlgorithmException e2) {
e = e2;
e.printStackTrace();
C0252.m1617(digestInputStream);
return null;
}
} catch (Throwable th) {
th = th;
closeable2 = closeable;
C0252.m1617(closeable2);
throw th;
}
} catch (IOException e3) {
e = e3;
digestInputStream = null;
e.printStackTrace();
C0252.m1617(digestInputStream);
return null;
} catch (NoSuchAlgorithmException e4) {
e = e4;
digestInputStream = null;
e.printStackTrace();
C0252.m1617(digestInputStream);
return null;
} catch (Throwable th2) {
th = th2;
C0252.m1617(closeable2);
throw th;
}
}
public static boolean m1771(File file) {
return m1723(file) && file.isFile();
}
public static String m1772(String str) {
return m1703(m1729(str));
}
public static List<File> m1773(String str, boolean z) {
return m1754(m1729(str), z);
}
public static boolean m1774(File file, String str, boolean z) {
BufferedWriter bufferedWriter;
if (file == null || str == null || !m1705(file)) {
return false;
}
BufferedWriter bufferedWriter2 = null;
try {
try {
bufferedWriter = new BufferedWriter(new FileWriter(file, z));
} catch (Throwable th) {
th = th;
}
} catch (IOException e) {
e = e;
}
try {
bufferedWriter.write(str);
C0252.m1617(bufferedWriter);
return true;
} catch (IOException e2) {
e = e2;
bufferedWriter2 = bufferedWriter;
e.printStackTrace();
C0252.m1617(bufferedWriter2);
return false;
} catch (Throwable th2) {
th = th2;
bufferedWriter2 = bufferedWriter;
C0252.m1617(bufferedWriter2);
throw th;
}
}
public static boolean m1775(File file) {
return file != null && (!file.exists() ? !file.mkdirs() : !file.isDirectory());
}
public static String m1776(File file) {
if (file == null) {
return null;
}
return m1718(file.getPath());
}
public static List<File> m1777(File file, FilenameFilter filenameFilter) {
if (file == null || !m1753(file)) {
return null;
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
if (filenameFilter.accept(file2.getParentFile(), file2.getName())) {
arrayList.add(file2);
}
if (file2.isDirectory()) {
arrayList.addAll(m1777(file2, filenameFilter));
}
}
}
return arrayList;
}
public static boolean m1778(String str) {
if (str == null) {
return true;
}
int length = str.length();
for (int i = 0; i < length; i++) {
if (!Character.isWhitespace(str.charAt(i))) {
return false;
}
}
return true;
}
public static List<String> m1779(File file, int i, int i2, String str) {
BufferedReader bufferedReader;
String str2 = null;
if (file == null || i > i2) {
return null;
}
try {
try {
ArrayList arrayList = new ArrayList();
bufferedReader = m1778(str) ? new BufferedReader(new FileReader(file)) : new BufferedReader(new InputStreamReader(new FileInputStream(file), str));
int i3 = 1;
while (true) {
try {
String readLine = bufferedReader.readLine();
if (readLine == null || i3 > i2) {
break;
}
if (i <= i3 && i3 <= i2) {
arrayList.add(readLine);
}
i3++;
} catch (IOException e) {
e = e;
e.printStackTrace();
C0252.m1617(bufferedReader);
return null;
}
}
C0252.m1617(bufferedReader);
return arrayList;
} catch (Throwable th) {
th = th;
str2 = str;
C0252.m1617(str2);
throw th;
}
} catch (IOException e2) {
e = e2;
bufferedReader = null;
} catch (Throwable th2) {
th = th2;
C0252.m1617(str2);
throw th;
}
}
public static List<File> m1780(String str, String str2) {
return m1752(m1729(str), str2);
}
public static List<String> m1781(String str, String str2) {
return m1698(m1729(str), str2);
}
public static String m1782(File file) {
return m1751(m1770(file));
}
}