正在查看: moonshot.企业版 v5.53.33 应用的 C1155.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: moonshot.企业版 v5.53.33 应用的 C1155.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package jnksI9k6J1HFuFo5YzBf.XiuvXGti2l5Gpvotr28R.UBVL9U3WwxbAPwDW6rA5.upyuhngDCr2AObMMnNNw;
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 C1155 {
private static final char[] f4549 = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
public static String m6000(String str) {
if (m6049(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 boolean m6001(String str) {
return m6063(m6069(str));
}
private static String m6002(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 = f4549;
cArr[i] = cArr2[(bArr[i2] >>> 4) & 15];
i = i3 + 1;
cArr[i3] = cArr2[bArr[i2] & 15];
}
return new String(cArr);
}
public static boolean m6003(File file, File file2) {
return m6081(file, file2, true);
}
public static boolean m6004(String str, String str2) {
return m6089(m6069(str), m6069(str2));
}
private static boolean m6005(String str, String str2, boolean z) {
return m6081(m6069(str), m6069(str2), z);
}
public static boolean m6006(String str) {
return m6042(m6069(str));
}
public static byte[] m6007(String str) {
return m6013(m6049(str) ? null : new File(str));
}
public static String m6008(File file) {
if (file == null) {
return null;
}
return m6071(file.getPath());
}
public static List<File> m6009(String str) {
return m6048(m6069(str));
}
public static java.lang.String m6010(java.io.File r5) {
throw new UnsupportedOperationException("Method not decompiled: jnksI9k6J1HFuFo5YzBf.XiuvXGti2l5Gpvotr28R.UBVL9U3WwxbAPwDW6rA5.upyuhngDCr2AObMMnNNw.C1155.m6010(java.io.File):java.lang.String");
}
public static boolean m6011(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 (!m6042(file2)) {
return false;
}
} else if (file2.isDirectory() && !m6045(file2)) {
return false;
}
}
}
return true;
}
public static String m6012(File file, String str) {
BufferedReader bufferedReader;
BufferedReader bufferedReader2 = null;
if (file == null) {
return null;
}
try {
StringBuilder sb = new StringBuilder();
bufferedReader = m6049(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();
C1138.m5674(bufferedReader);
return sb2;
}
sb.append(readLine);
sb.append("\r\n");
} catch (IOException e) {
e = e;
e.printStackTrace();
C1138.m5674(bufferedReader);
return null;
}
} catch (Throwable th) {
th = th;
bufferedReader2 = bufferedReader;
C1138.m5674(bufferedReader2);
throw th;
}
}
} catch (IOException e2) {
e = e2;
bufferedReader = null;
} catch (Throwable th2) {
th = th2;
C1138.m5674(bufferedReader2);
throw th;
}
}
public static byte[] m6013(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();
C1138.m5674(digestInputStream);
return digest;
} catch (IOException e) {
e = e;
e.printStackTrace();
C1138.m5674(digestInputStream);
return null;
} catch (NoSuchAlgorithmException e2) {
e = e2;
e.printStackTrace();
C1138.m5674(digestInputStream);
return null;
}
} catch (Throwable th) {
th = th;
closeable2 = closeable;
C1138.m5674(closeable2);
throw th;
}
} catch (IOException e3) {
e = e3;
digestInputStream = null;
e.printStackTrace();
C1138.m5674(digestInputStream);
return null;
} catch (NoSuchAlgorithmException e4) {
e = e4;
digestInputStream = null;
e.printStackTrace();
C1138.m5674(digestInputStream);
return null;
} catch (Throwable th2) {
th = th2;
C1138.m5674(closeable2);
throw th;
}
}
public static boolean m6014(File file) {
return file != null && file.exists();
}
public static byte[] m6015(String str) {
return m6065(m6069(str));
}
public static boolean m6016(File file, String str) {
if (file == null || !file.exists() || m6049(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 List<File> m6017(File file, FilenameFilter filenameFilter, boolean z) {
if (z) {
return m6024(file, filenameFilter);
}
if (file == null || !m6050(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;
}
public static String m6018(String str, String str2) {
return m6012(m6069(str), str2);
}
private static ByteArrayOutputStream m6019(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) {
C1138.m5674(inputStream);
return byteArrayOutputStream;
}
byteArrayOutputStream.write(bArr, 0, read);
}
} catch (IOException e) {
e.printStackTrace();
C1138.m5674(inputStream);
return null;
}
} catch (Throwable th) {
C1138.m5674(inputStream);
throw th;
}
}
public static List<File> m6020(File file, boolean z) {
if (!m6050(file)) {
return null;
}
if (z) {
return m6048(file);
}
ArrayList arrayList = new ArrayList();
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
Collections.addAll(arrayList, listFiles);
}
return arrayList;
}
public static long m6021(File file) {
if (file == null) {
return -1L;
}
return file.lastModified();
}
public static String m6022(String str) {
return m6067(m6069(str));
}
public static boolean m6023(File file, String str, boolean z) {
BufferedWriter bufferedWriter;
if (file == null || str == null || !m6063(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);
C1138.m5674(bufferedWriter);
return true;
} catch (IOException e2) {
e = e2;
bufferedWriter2 = bufferedWriter;
e.printStackTrace();
C1138.m5674(bufferedWriter2);
return false;
} catch (Throwable th2) {
th = th2;
bufferedWriter2 = bufferedWriter;
C1138.m5674(bufferedWriter2);
throw th;
}
}
public static List<File> m6024(File file, FilenameFilter filenameFilter) {
if (file == null || !m6050(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(m6024(file2, filenameFilter));
}
}
}
return arrayList;
}
public static String m6025(File file) {
long m6088 = m6088(file);
return m6088 == -1 ? "" : m6060(m6088);
}
public static List<File> m6026(File file, String str) {
if (file == null || !m6050(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(m6026(file2, str));
}
}
}
return arrayList;
}
public static long m6027(File file) {
if (m6059(file)) {
return file.length();
}
return -1L;
}
public static long m6028(String str) {
return m6088(m6069(str));
}
private static boolean m6029(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() || !m6033(file2)) {
return false;
}
for (File file3 : file.listFiles()) {
File file4 = new File(str2 + file3.getName());
if (file3.isFile()) {
if (!m6081(file3, file4, z)) {
return false;
}
} else if (file3.isDirectory() && !m6029(file3, file4, z)) {
return false;
}
}
return !z || m6045(file);
}
public static boolean m6030(File file, File file2) {
return m6029(file, file2, true);
}
public static boolean m6031(String str, String str2) {
return m6043(m6069(str), m6069(str2));
}
public static String m6032(String str) {
return m6046(m6049(str) ? null : new File(str));
}
public static boolean m6033(File file) {
return file != null && (!file.exists() ? !file.mkdirs() : !file.isDirectory());
}
private static boolean m6034(String str, String str2, boolean z) {
return m6029(m6069(str), m6069(str2), z);
}
private static byte[] m6035(InputStream inputStream) {
if (inputStream == null) {
return null;
}
return m6019(inputStream).toByteArray();
}
public static boolean m6036(File file) {
if (file == null) {
return false;
}
if ((file.exists() && file.isFile() && !file.delete()) || !m6033(file.getParentFile())) {
return false;
}
try {
return file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static boolean m6037(String str, String str2) {
return m6030(m6069(str), m6069(str2));
}
public static boolean m6038(String str) {
return m6011(m6069(str));
}
public static InputStream m6039(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 boolean m6040(String str) {
return m6036(m6069(str));
}
public static boolean m6041(File file, InputStream inputStream, boolean z) {
BufferedOutputStream bufferedOutputStream;
if (file == null || inputStream == null || !m6063(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) {
C1138.m5674(inputStream, bufferedOutputStream);
return true;
}
bufferedOutputStream.write(bArr, 0, read);
}
} catch (IOException e2) {
e = e2;
bufferedOutputStream2 = bufferedOutputStream;
e.printStackTrace();
C1138.m5674(inputStream, bufferedOutputStream2);
return false;
} catch (Throwable th2) {
th = th2;
bufferedOutputStream2 = bufferedOutputStream;
C1138.m5674(inputStream, bufferedOutputStream2);
throw th;
}
}
public static boolean m6042(File file) {
return file != null && (!file.exists() || (file.isFile() && file.delete()));
}
public static boolean m6043(File file, File file2) {
return m6029(file, file2, false);
}
public static List<File> m6044(File file, String str, boolean z) {
if (z) {
return m6086(file, str);
}
if (file == null || !m6050(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;
}
public static boolean m6045(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 (!m6042(file2)) {
return false;
}
} else if (file2.isDirectory() && !m6045(file2)) {
return false;
}
}
}
return file.delete();
}
public static String m6046(File file) {
return m6002(m6013(file));
}
public static List<File> m6047(String str, boolean z) {
return m6020(m6069(str), z);
}
public static List<File> m6048(File file) {
List<File> m6048;
if (!m6050(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() && (m6048 = m6048(file2)) != null) {
arrayList.addAll(m6048);
}
}
}
return arrayList;
}
public static boolean m6049(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 boolean m6050(File file) {
return m6014(file) && file.isDirectory();
}
public static long m6051(String str) {
return m6027(m6069(str));
}
public static String m6052(String str) {
if (m6049(str)) {
return str;
}
int lastIndexOf = str.lastIndexOf(File.separator);
return lastIndexOf == -1 ? "" : str.substring(0, lastIndexOf + 1);
}
public static List<File> m6053(String str, String str2) {
return m6026(m6069(str), str2);
}
public static List<String> m6054(String str, String str2) {
return m6080(m6069(str), str2);
}
public static String m6055(String str) {
return m6025(m6069(str));
}
public static String m6056(String str) {
if (m6049(str)) {
return str;
}
int lastIndexOf = str.lastIndexOf(46);
return (lastIndexOf == -1 || str.lastIndexOf(File.separator) >= lastIndexOf) ? "" : str.substring(lastIndexOf + 1);
}
public static int m6057(String str) {
return m6083(m6069(str));
}
public static List<File> m6058(String str, String str2) {
return m6086(m6069(str), str2);
}
public static boolean m6059(File file) {
return m6014(file) && file.isFile();
}
@SuppressLint({"DefaultLocale"})
private static String m6060(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 m6061(String str, String str2, boolean z) {
return m6023(m6069(str), str2, z);
}
public static boolean m6062(String str) {
return m6045(m6069(str));
}
public static boolean m6063(File file) {
if (file == null) {
return false;
}
if (file.exists()) {
return file.isFile();
}
if (!m6033(file.getParentFile())) {
return false;
}
try {
return file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
public static List<File> m6064(String str, FilenameFilter filenameFilter) {
return m6024(m6069(str), filenameFilter);
}
public static byte[] m6065(File file) {
if (file == null) {
return null;
}
try {
return m6035(new FileInputStream(file));
} catch (FileNotFoundException e) {
e.printStackTrace();
return null;
}
}
public static List<String> m6066(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 = m6049(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();
C1138.m5674(bufferedReader);
return null;
}
}
C1138.m5674(bufferedReader);
return arrayList;
} catch (Throwable th) {
th = th;
str2 = str;
C1138.m5674(str2);
throw th;
}
} catch (IOException e2) {
e = e2;
bufferedReader = null;
} catch (Throwable th2) {
th = th2;
C1138.m5674(str2);
throw th;
}
}
public static String m6067(File file) {
long m6027 = m6027(file);
return m6027 == -1 ? "" : m6060(m6027);
}
public static boolean m6068(String str, InputStream inputStream, boolean z) {
return m6041(m6069(str), inputStream, z);
}
public static File m6069(String str) {
if (m6049(str)) {
return null;
}
return new File(str);
}
public static List<File> m6070(String str, String str2, boolean z) {
return m6044(m6069(str), str2, z);
}
public static String m6071(String str) {
int lastIndexOf;
return (m6049(str) || (lastIndexOf = str.lastIndexOf(File.separator)) == -1) ? str : str.substring(lastIndexOf + 1);
}
public static String m6072(File file) {
if (file == null) {
return null;
}
return m6052(file.getPath());
}
public static long m6073(String str) {
return m6021(m6069(str));
}
public static boolean m6074(String str) {
return m6033(m6069(str));
}
public static boolean m6075(String str) {
return m6050(m6069(str));
}
public static boolean m6076(String str, String str2) {
return m6016(m6069(str), str2);
}
public static boolean m6077(String str, String str2) {
return m6003(m6069(str), m6069(str2));
}
public static String m6078(File file) {
if (file == null) {
return null;
}
return m6000(file.getPath());
}
public static boolean m6079(String str) {
return m6059(m6069(str));
}
public static List<String> m6080(File file, String str) {
return m6066(file, 0, AbsEventTracker.NONE_TIME, str);
}
private static boolean m6081(File file, File file2, boolean z) {
if (file != null && file2 != null && file.exists() && file.isFile()) {
if ((file2.exists() && file2.isFile()) || !m6033(file2.getParentFile())) {
return false;
}
try {
if (!m6041(file2, new FileInputStream(file), false)) {
return false;
}
if (z) {
if (!m6042(file)) {
return false;
}
}
return true;
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
return false;
}
public static String m6082(String str) {
return m6010(m6069(str));
}
public static int m6083(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();
C1138.m5674(bufferedInputStream2);
return i;
}
}
C1138.m5674(bufferedInputStream);
} catch (Throwable th) {
th = th;
bufferedInputStream2 = bufferedInputStream;
C1138.m5674(bufferedInputStream2);
throw th;
}
} catch (IOException e3) {
e = e3;
bufferedInputStream2 = bufferedInputStream;
i = 1;
e.printStackTrace();
C1138.m5674(bufferedInputStream2);
return i;
}
return i;
} catch (Throwable th2) {
th = th2;
}
}
public static String m6084(File file) {
if (file == null) {
return null;
}
return m6056(file.getPath());
}
public static List<File> m6085(String str, FilenameFilter filenameFilter, boolean z) {
return m6017(m6069(str), filenameFilter, z);
}
public static List<File> m6086(File file, String str) {
if (file == null || !m6050(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(m6086(file2, str));
}
}
}
return arrayList;
}
public static boolean m6087(String str) {
return m6014(m6069(str));
}
public static long m6088(File file) {
if (!m6050(file)) {
return -1L;
}
long j = 0;
File[] listFiles = file.listFiles();
if (listFiles != null && listFiles.length != 0) {
for (File file2 : listFiles) {
j += file2.isDirectory() ? m6088(file2) : file2.length();
}
}
return j;
}
public static boolean m6089(File file, File file2) {
return m6081(file, file2, false);
}
public static List<String> m6090(String str, int i, int i2, String str2) {
return m6066(m6069(str), i, i2, str2);
}
}