正在查看: Tasker v6.5.11 应用的 c0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 c0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package q9;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
public final class c0 {
private static final q0 a = q0.c('.');
private static final q0 b = q0.c(':');
private static final Inet4Address c = (Inet4Address) b("127.0.0.1");
private static final Inet4Address d = (Inet4Address) b("0.0.0.0");
public static String a(InetAddress inetAddress) {
inetAddress.getClass();
if (inetAddress instanceof Inet4Address) {
return inetAddress.getHostAddress();
}
c.d(inetAddress instanceof Inet6Address);
byte[] address = inetAddress.getAddress();
int[] iArr = new int[8];
for (int i = 0; i < 8; i++) {
int i2 = i + i;
iArr[i] = (address[i2 + 1] & 255) | ((address[i2] & 255) << 8);
}
int i3 = -1;
int i4 = -1;
int i5 = -1;
for (int i6 = 0; i6 < 9; i6++) {
if (i6 >= 8 || iArr[i6] != 0) {
if (i5 >= 0) {
int i10 = i6 - i5;
int i11 = i10 > i3 ? i10 : i3;
if (i10 > i3) {
i4 = i5;
}
i3 = i11;
i5 = -1;
}
} else if (i5 < 0) {
i5 = i6;
}
}
if (i3 >= 2) {
Arrays.fill(iArr, i4, i3 + i4, -1);
}
StringBuilder sb2 = new StringBuilder(39);
int i12 = 0;
boolean z = false;
while (i12 < 8) {
boolean z2 = iArr[i12] >= 0;
if (z2) {
if (z) {
sb2.append(':');
}
sb2.append(Integer.toHexString(iArr[i12]));
} else if (i12 == 0 || z) {
sb2.append("::");
}
i12++;
z = z2;
}
return sb2.toString();
}
public static java.net.InetAddress b(java.lang.String r15) {
throw new UnsupportedOperationException("Method not decompiled: q9.c0.b(java.lang.String):java.net.InetAddress");
}
private static InetAddress c(byte[] bArr) {
try {
return InetAddress.getByAddress(bArr);
} catch (UnknownHostException e) {
throw new AssertionError(e);
}
}
private static byte[] d(String str) {
if (a.b(str) + 1 != 4) {
return null;
}
byte[] bArr = new byte[4];
int i = 0;
for (int i2 = 0; i2 < 4; i2++) {
int indexOf = str.indexOf(46, i);
if (indexOf == -1) {
indexOf = str.length();
}
int i3 = indexOf - i;
if (i3 <= 0 || i3 > 3) {
throw new NumberFormatException();
}
if (i3 > 1) {
try {
if (str.charAt(i) == '0') {
throw new NumberFormatException();
}
} catch (NumberFormatException unused) {
return null;
}
}
int i4 = 0;
while (i < indexOf) {
int i5 = i4 * 10;
int digit = Character.digit(str.charAt(i), 10);
if (digit < 0) {
throw new NumberFormatException();
}
i4 = i5 + digit;
i++;
}
if (i4 > 255) {
throw new NumberFormatException();
}
bArr[i2] = (byte) i4;
i = indexOf + 1;
}
return bArr;
}
}