2473 lines
		
	
	
		
			46 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			2473 lines
		
	
	
		
			46 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public final Lcom/google/common/net/InetAddresses;
 | |
| .super Ljava/lang/Object;
 | |
| .source "InetAddresses.java"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Lcom/google/common/annotations/Beta;
 | |
| .end annotation
 | |
| 
 | |
| .annotation build Lcom/google/common/annotations/GwtIncompatible;
 | |
| .end annotation
 | |
| 
 | |
| .annotation runtime Lcom/google/common/net/ElementTypesAreNonnullByDefault;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/MemberClasses;
 | |
|     value = {
 | |
|         Lcom/google/common/net/InetAddresses$TeredoInfo;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final ANY4:Ljava/net/Inet4Address;
 | |
| 
 | |
| .field private static final IPV4_DELIMITER:C = '.'
 | |
| 
 | |
| .field private static final IPV4_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
| .field private static final IPV4_PART_COUNT:I = 0x4
 | |
| 
 | |
| .field private static final IPV6_DELIMITER:C = ':'
 | |
| 
 | |
| .field private static final IPV6_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
| .field private static final IPV6_PART_COUNT:I = 0x8
 | |
| 
 | |
| .field private static final LOOPBACK4:Ljava/net/Inet4Address;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static constructor <clinit>()V
 | |
|     .locals 1
 | |
| 
 | |
|     const/16 v0, 0x2e
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {v0}, Lcom/google/common/base/CharMatcher;->is(C)Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     sput-object v0, Lcom/google/common/net/InetAddresses;->IPV4_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     const/16 v0, 0x3a
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {v0}, Lcom/google/common/base/CharMatcher;->is(C)Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     sput-object v0, Lcom/google/common/net/InetAddresses;->IPV6_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     const-string v0, "127.0.0.1"
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->forString(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     sput-object v0, Lcom/google/common/net/InetAddresses;->LOOPBACK4:Ljava/net/Inet4Address;
 | |
| 
 | |
|     const-string v0, "0.0.0.0"
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->forString(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     check-cast v0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     sput-object v0, Lcom/google/common/net/InetAddresses;->ANY4:Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private constructor <init>()V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$000()Ljava/net/Inet4Address;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     sget-object v0, Lcom/google/common/net/InetAddresses;->ANY4:Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method private static bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     :try_start_0
 | |
|     invoke-static {p0}, Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
|     :try_end_0
 | |
|     .catch Ljava/net/UnknownHostException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p0
 | |
| 
 | |
|     .line 2
 | |
|     new-instance v0, Ljava/lang/AssertionError;
 | |
| 
 | |
|     invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
 | |
| 
 | |
|     throw v0
 | |
| .end method
 | |
| 
 | |
| .method public static coerceToInteger(Ljava/net/InetAddress;)I
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getCoercedIPv4Address(Ljava/net/InetAddress;)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Ljava/net/Inet4Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/io/ByteStreams;->newDataInput([B)Lcom/google/common/io/ByteArrayDataInput;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-interface {p0}, Lcom/google/common/io/ByteArrayDataInput;->readInt()I
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method private static compressLongestRunOfZeroes([I)V
 | |
|     .locals 6
 | |
| 
 | |
|     const/4 v0, -0x1
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v2, v0
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     move v4, v3
 | |
| 
 | |
|     .line 1
 | |
|     :goto_0
 | |
|     array-length v5, p0
 | |
| 
 | |
|     add-int/lit8 v5, v5, 0x1
 | |
| 
 | |
|     if-ge v1, v5, :cond_3
 | |
| 
 | |
|     .line 2
 | |
|     array-length v5, p0
 | |
| 
 | |
|     if-ge v1, v5, :cond_0
 | |
| 
 | |
|     aget v5, p0, v1
 | |
| 
 | |
|     if-nez v5, :cond_0
 | |
| 
 | |
|     if-gez v4, :cond_2
 | |
| 
 | |
|     move v4, v1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_0
 | |
|     if-ltz v4, :cond_2
 | |
| 
 | |
|     sub-int v5, v1, v4
 | |
| 
 | |
|     if-le v5, v2, :cond_1
 | |
| 
 | |
|     move v3, v4
 | |
| 
 | |
|     move v2, v5
 | |
| 
 | |
|     :cond_1
 | |
|     move v4, v0
 | |
| 
 | |
|     :cond_2
 | |
|     :goto_1
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_3
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     if-lt v2, v1, :cond_4
 | |
| 
 | |
|     add-int/2addr v2, v3
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, v3, v2, v0}, Ljava/util/Arrays;->fill([IIII)V
 | |
| 
 | |
|     :cond_4
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private static convertDottedQuadToHex(Ljava/lang/String;)Ljava/lang/String;
 | |
|     .locals 5
 | |
|     .annotation runtime Ljavax/annotation/CheckForNull;
 | |
|     .end annotation
 | |
| 
 | |
|     const/16 v0, 0x3a
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, v0}, Ljava/lang/String;->lastIndexOf(I)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     add-int/2addr v0, v1
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, v2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->textToNumericFormatV4(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-nez p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_0
 | |
|     aget-byte v0, p0, v2
 | |
| 
 | |
|     and-int/lit16 v0, v0, 0xff
 | |
| 
 | |
|     shl-int/lit8 v0, v0, 0x8
 | |
| 
 | |
|     aget-byte v2, p0, v1
 | |
| 
 | |
|     and-int/lit16 v2, v2, 0xff
 | |
| 
 | |
|     or-int/2addr v0, v2
 | |
| 
 | |
|     invoke-static {v0}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const/4 v2, 0x2
 | |
| 
 | |
|     .line 6
 | |
|     aget-byte v2, p0, v2
 | |
| 
 | |
|     and-int/lit16 v2, v2, 0xff
 | |
| 
 | |
|     shl-int/lit8 v2, v2, 0x8
 | |
| 
 | |
|     const/4 v4, 0x3
 | |
| 
 | |
|     aget-byte p0, p0, v4
 | |
| 
 | |
|     and-int/lit16 p0, p0, 0xff
 | |
| 
 | |
|     or-int/2addr p0, v2
 | |
| 
 | |
|     invoke-static {p0}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {v3, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     invoke-static {v0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     invoke-static {p0, v1}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const-string v2, ":"
 | |
| 
 | |
|     invoke-static {v1, v3, v0, v2, p0}, Lcom/android/billingclient/api/f;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static decrement(Ljava/net/InetAddress;)Ljava/net/InetAddress;
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     array-length v1, v0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     sub-int/2addr v1, v2
 | |
| 
 | |
|     :goto_0
 | |
|     if-ltz v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     aget-byte v3, v0, v1
 | |
| 
 | |
|     if-nez v3, :cond_0
 | |
| 
 | |
|     const/4 v3, -0x1
 | |
| 
 | |
|     .line 4
 | |
|     aput-byte v3, v0, v1
 | |
| 
 | |
|     add-int/lit8 v1, v1, -0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     if-ltz v1, :cond_1
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     :goto_1
 | |
|     const-string v4, "Decrementing %s would wrap."
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {v3, v4, p0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 6
 | |
|     aget-byte p0, v0, v1
 | |
| 
 | |
|     sub-int/2addr p0, v2
 | |
| 
 | |
|     int-to-byte p0, p0
 | |
| 
 | |
|     aput-byte p0, v0, v1
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static forString(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->ipStringToBytes(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     new-array v0, v0, [Ljava/lang/Object;
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     aput-object p0, v0, v1
 | |
| 
 | |
|     const-string p0, "\'%s\' is not an IP string literal."
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->formatIllegalArgumentException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method public static forUriString(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->forUriStringNoThrow(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     return-object v0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     new-array v0, v0, [Ljava/lang/Object;
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     aput-object p0, v0, v1
 | |
| 
 | |
|     const-string p0, "Not a valid URI IP literal: \'%s\'"
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->formatIllegalArgumentException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method private static forUriStringNoThrow(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
|     .locals 2
 | |
|     .annotation runtime Ljavax/annotation/CheckForNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     const-string v0, "["
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const-string v0, "]"
 | |
| 
 | |
|     invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     sub-int/2addr v0, v1
 | |
| 
 | |
|     invoke-virtual {p0, v1, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0x10
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x4
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->ipStringToBytes(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_2
 | |
| 
 | |
|     .line 5
 | |
|     array-length v1, p0
 | |
| 
 | |
|     if-eq v1, v0, :cond_1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 6
 | |
|     :cond_1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_2
 | |
|     :goto_1
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method private static varargs formatIllegalArgumentException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     sget-object v1, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
 | |
| 
 | |
|     invoke-static {v1, p0, p1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method private static fromBigInteger(Ljava/math/BigInteger;Z)Ljava/net/InetAddress;
 | |
|     .locals 9
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/math/BigInteger;->signum()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     if-ltz v0, :cond_0
 | |
| 
 | |
|     move v0, v1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     move v0, v2
 | |
| 
 | |
|     :goto_0
 | |
|     const-string v3, "BigInteger must be greater than or equal to 0"
 | |
| 
 | |
|     invoke-static {v0, v3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/Object;)V
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     const/16 p1, 0x10
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 p1, 0x4
 | |
| 
 | |
|     .line 2
 | |
|     :goto_1
 | |
|     invoke-virtual {p0}, Ljava/math/BigInteger;->toByteArray()[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 3
 | |
|     new-array v3, p1, [B
 | |
| 
 | |
|     .line 4
 | |
|     array-length v4, v0
 | |
| 
 | |
|     sub-int/2addr v4, p1
 | |
| 
 | |
|     invoke-static {v2, v4}, Ljava/lang/Math;->max(II)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     .line 5
 | |
|     array-length v5, v0
 | |
| 
 | |
|     sub-int/2addr v5, v4
 | |
| 
 | |
|     sub-int v6, p1, v5
 | |
| 
 | |
|     move v7, v2
 | |
| 
 | |
|     :goto_2
 | |
|     if-ge v7, v4, :cond_3
 | |
| 
 | |
|     .line 6
 | |
|     aget-byte v8, v0, v7
 | |
| 
 | |
|     if-nez v8, :cond_2
 | |
| 
 | |
|     add-int/lit8 v7, v7, 0x1
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     :cond_2
 | |
|     const/4 v0, 0x2
 | |
| 
 | |
|     new-array v0, v0, [Ljava/lang/Object;
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     aput-object p1, v0, v2
 | |
| 
 | |
|     aput-object p0, v0, v1
 | |
| 
 | |
|     const-string p0, "BigInteger cannot be converted to InetAddress because it has more than %d bytes: %s"
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->formatIllegalArgumentException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     .line 9
 | |
|     :cond_3
 | |
|     invoke-static {v0, v4, v3, v6, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
 | |
| 
 | |
|     .line 10
 | |
|     :try_start_0
 | |
|     invoke-static {v3}, Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
|     :try_end_0
 | |
|     .catch Ljava/net/UnknownHostException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p0
 | |
| 
 | |
|     .line 11
 | |
|     new-instance p1, Ljava/lang/AssertionError;
 | |
| 
 | |
|     invoke-direct {p1, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
 | |
| 
 | |
|     throw p1
 | |
| .end method
 | |
| 
 | |
| .method public static fromIPv4BigInteger(Ljava/math/BigInteger;)Ljava/net/Inet4Address;
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->fromBigInteger(Ljava/math/BigInteger;Z)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     check-cast p0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static fromIPv6BigInteger(Ljava/math/BigInteger;)Ljava/net/Inet6Address;
 | |
|     .locals 1
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->fromBigInteger(Ljava/math/BigInteger;Z)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     check-cast p0, Ljava/net/Inet6Address;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static fromInteger(I)Ljava/net/Inet4Address;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/primitives/Ints;->toByteArray(I)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static fromLittleEndianByteArray([B)Ljava/net/InetAddress;
 | |
|     .locals 3
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Ljava/net/UnknownHostException;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     array-length v0, p0
 | |
| 
 | |
|     new-array v0, v0, [B
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     array-length v2, p0
 | |
| 
 | |
|     if-ge v1, v2, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     array-length v2, p0
 | |
| 
 | |
|     sub-int/2addr v2, v1
 | |
| 
 | |
|     add-int/lit8 v2, v2, -0x1
 | |
| 
 | |
|     aget-byte v2, p0, v2
 | |
| 
 | |
|     aput-byte v2, v0, v1
 | |
| 
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-static {v0}, Ljava/net/InetAddress;->getByAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static get6to4IPv4Address(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->is6to4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const-string v2, "Address \'%s\' is not a 6to4 address."
 | |
| 
 | |
|     invoke-static {v0, v2, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x2
 | |
| 
 | |
|     const/4 v1, 0x6
 | |
| 
 | |
|     invoke-static {p0, v0, v1}, Ljava/util/Arrays;->copyOfRange([BII)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getCoercedIPv4Address(Ljava/net/InetAddress;)Ljava/net/Inet4Address;
 | |
|     .locals 6
 | |
| 
 | |
|     .line 1
 | |
|     instance-of v0, p0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     check-cast p0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     :goto_0
 | |
|     const/16 v3, 0xf
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     if-ge v2, v3, :cond_2
 | |
| 
 | |
|     .line 4
 | |
|     aget-byte v5, v0, v2
 | |
| 
 | |
|     if-eqz v5, :cond_1
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     add-int/lit8 v2, v2, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_2
 | |
|     move v2, v4
 | |
| 
 | |
|     :goto_1
 | |
|     if-eqz v2, :cond_3
 | |
| 
 | |
|     .line 5
 | |
|     aget-byte v5, v0, v3
 | |
| 
 | |
|     if-ne v5, v4, :cond_3
 | |
| 
 | |
|     .line 6
 | |
|     sget-object p0, Lcom/google/common/net/InetAddresses;->LOOPBACK4:Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_3
 | |
|     if-eqz v2, :cond_4
 | |
| 
 | |
|     .line 7
 | |
|     aget-byte v0, v0, v3
 | |
| 
 | |
|     if-nez v0, :cond_4
 | |
| 
 | |
|     .line 8
 | |
|     sget-object p0, Lcom/google/common/net/InetAddresses;->ANY4:Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 9
 | |
|     :cond_4
 | |
|     check-cast p0, Ljava/net/Inet6Address;
 | |
| 
 | |
|     .line 10
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->hasEmbeddedIPv4ClientAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_5
 | |
| 
 | |
|     .line 11
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getEmbeddedIPv4ClientAddress(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Ljava/net/Inet4Address;->hashCode()I
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     int-to-long v0, p0
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 12
 | |
|     :cond_5
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0x8
 | |
| 
 | |
|     invoke-static {p0, v1, v0}, Ljava/nio/ByteBuffer;->wrap([BII)Ljava/nio/ByteBuffer;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Ljava/nio/ByteBuffer;->getLong()J
 | |
| 
 | |
|     move-result-wide v0
 | |
| 
 | |
|     .line 13
 | |
|     :goto_2
 | |
|     invoke-static {}, Lcom/google/common/hash/Hashing;->murmur3_32_fixed()Lcom/google/common/hash/HashFunction;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-interface {p0, v0, v1}, Lcom/google/common/hash/HashFunction;->hashLong(J)Lcom/google/common/hash/HashCode;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Lcom/google/common/hash/HashCode;->asInt()I
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     const/high16 v0, -0x20000000
 | |
| 
 | |
|     or-int/2addr p0, v0
 | |
| 
 | |
|     const/4 v0, -0x1
 | |
| 
 | |
|     if-ne p0, v0, :cond_6
 | |
| 
 | |
|     const/4 p0, -0x2
 | |
| 
 | |
|     .line 14
 | |
|     :cond_6
 | |
|     invoke-static {p0}, Lcom/google/common/primitives/Ints;->toByteArray(I)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getCompatIPv4Address(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isCompatIPv4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const-string v2, "Address \'%s\' is not IPv4-compatible."
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {v0, v2, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0xc
 | |
| 
 | |
|     const/16 v1, 0x10
 | |
| 
 | |
|     invoke-static {p0, v0, v1}, Ljava/util/Arrays;->copyOfRange([BII)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getEmbeddedIPv4ClientAddress(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isCompatIPv4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getCompatIPv4Address(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->is6to4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_1
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->get6to4IPv4Address(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isTeredoAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_2
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getTeredoInfo(Ljava/net/Inet6Address;)Lcom/google/common/net/InetAddresses$TeredoInfo;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Lcom/google/common/net/InetAddresses$TeredoInfo;->getClient()Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_2
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     new-array v0, v0, [Ljava/lang/Object;
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     aput-object p0, v0, v1
 | |
| 
 | |
|     const-string p0, "\'%s\' has no embedded IPv4 address."
 | |
| 
 | |
|     invoke-static {p0, v0}, Lcom/google/common/net/InetAddresses;->formatIllegalArgumentException(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/IllegalArgumentException;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method private static getInet4Address([B)Ljava/net/Inet4Address;
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     array-length v0, p0
 | |
| 
 | |
|     const/4 v1, 0x4
 | |
| 
 | |
|     if-ne v0, v1, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     array-length v1, p0
 | |
| 
 | |
|     const-string v2, "Byte array has invalid length for an IPv4 address: %s != 4."
 | |
| 
 | |
|     invoke-static {v0, v2, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     check-cast p0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getIsatapIPv4Address(Ljava/net/Inet6Address;)Ljava/net/Inet4Address;
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isIsatapAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const-string v2, "Address \'%s\' is not an ISATAP address."
 | |
| 
 | |
|     invoke-static {v0, v2, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0xc
 | |
| 
 | |
|     const/16 v1, 0x10
 | |
| 
 | |
|     invoke-static {p0, v0, v1}, Ljava/util/Arrays;->copyOfRange([BII)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getTeredoInfo(Ljava/net/Inet6Address;)Lcom/google/common/net/InetAddresses$TeredoInfo;
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isTeredoAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     const-string v2, "Address \'%s\' is not a Teredo address."
 | |
| 
 | |
|     invoke-static {v0, v2, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x4
 | |
| 
 | |
|     const/16 v1, 0x8
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, v0, v1}, Ljava/util/Arrays;->copyOfRange([BII)[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {p0, v1}, Lcom/google/common/io/ByteStreams;->newDataInput([BI)Lcom/google/common/io/ByteArrayDataInput;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     invoke-interface {v1}, Lcom/google/common/io/ByteArrayDataInput;->readShort()S
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const v2, 0xffff
 | |
| 
 | |
|     and-int/2addr v1, v2
 | |
| 
 | |
|     const/16 v3, 0xa
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {p0, v3}, Lcom/google/common/io/ByteStreams;->newDataInput([BI)Lcom/google/common/io/ByteArrayDataInput;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     invoke-interface {v3}, Lcom/google/common/io/ByteArrayDataInput;->readShort()S
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     not-int v3, v3
 | |
| 
 | |
|     and-int/2addr v2, v3
 | |
| 
 | |
|     const/16 v3, 0xc
 | |
| 
 | |
|     const/16 v4, 0x10
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {p0, v3, v4}, Ljava/util/Arrays;->copyOfRange([BII)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     .line 7
 | |
|     :goto_0
 | |
|     array-length v4, p0
 | |
| 
 | |
|     if-ge v3, v4, :cond_0
 | |
| 
 | |
|     .line 8
 | |
|     aget-byte v4, p0, v3
 | |
| 
 | |
|     not-int v4, v4
 | |
| 
 | |
|     int-to-byte v4, v4
 | |
| 
 | |
|     aput-byte v4, p0, v3
 | |
| 
 | |
|     add-int/lit8 v3, v3, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 9
 | |
|     :cond_0
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->getInet4Address([B)Ljava/net/Inet4Address;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 10
 | |
|     new-instance v3, Lcom/google/common/net/InetAddresses$TeredoInfo;
 | |
| 
 | |
|     invoke-direct {v3, v0, p0, v2, v1}, Lcom/google/common/net/InetAddresses$TeredoInfo;-><init>(Ljava/net/Inet4Address;Ljava/net/Inet4Address;II)V
 | |
| 
 | |
|     return-object v3
 | |
| .end method
 | |
| 
 | |
| .method public static hasEmbeddedIPv4ClientAddress(Ljava/net/Inet6Address;)Z
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isCompatIPv4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->is6to4Address(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isTeredoAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     :goto_1
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method private static hextetsToIPv6String([I)Ljava/lang/String;
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/lang/StringBuilder;
 | |
| 
 | |
|     const/16 v1, 0x27
 | |
| 
 | |
|     invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     array-length v4, p0
 | |
| 
 | |
|     if-ge v2, v4, :cond_5
 | |
| 
 | |
|     .line 3
 | |
|     aget v4, p0, v2
 | |
| 
 | |
|     if-ltz v4, :cond_0
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_0
 | |
|     move v4, v1
 | |
| 
 | |
|     :goto_1
 | |
|     if-eqz v4, :cond_2
 | |
| 
 | |
|     if-eqz v3, :cond_1
 | |
| 
 | |
|     const/16 v3, 0x3a
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     .line 5
 | |
|     :cond_1
 | |
|     aget v3, p0, v2
 | |
| 
 | |
|     invoke-static {v3}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v3
 | |
| 
 | |
|     invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     :cond_2
 | |
|     if-eqz v2, :cond_3
 | |
| 
 | |
|     if-eqz v3, :cond_4
 | |
| 
 | |
|     :cond_3
 | |
|     const-string v3, "::"
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     :cond_4
 | |
|     :goto_2
 | |
|     add-int/lit8 v2, v2, 0x1
 | |
| 
 | |
|     move v3, v4
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 7
 | |
|     :cond_5
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static increment(Ljava/net/InetAddress;)Ljava/net/InetAddress;
 | |
|     .locals 6
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 2
 | |
|     array-length v1, v0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     sub-int/2addr v1, v2
 | |
| 
 | |
|     :goto_0
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     if-ltz v1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     aget-byte v4, v0, v1
 | |
| 
 | |
|     const/4 v5, -0x1
 | |
| 
 | |
|     if-ne v4, v5, :cond_0
 | |
| 
 | |
|     .line 4
 | |
|     aput-byte v3, v0, v1
 | |
| 
 | |
|     add-int/lit8 v1, v1, -0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     if-ltz v1, :cond_1
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     :cond_1
 | |
|     const-string v4, "Incrementing %s would wrap."
 | |
| 
 | |
|     .line 5
 | |
|     invoke-static {v3, v4, p0}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V
 | |
| 
 | |
|     .line 6
 | |
|     aget-byte p0, v0, v1
 | |
| 
 | |
|     add-int/2addr p0, v2
 | |
| 
 | |
|     int-to-byte p0, p0
 | |
| 
 | |
|     aput-byte p0, v0, v1
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {v0}, Lcom/google/common/net/InetAddresses;->bytesToInetAddress([B)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method private static ipStringToBytes(Ljava/lang/String;)[B
 | |
|     .locals 9
 | |
|     .annotation runtime Ljavax/annotation/CheckForNull;
 | |
|     .end annotation
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     move v1, v0
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     .line 1
 | |
|     :goto_0
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     const/4 v5, -0x1
 | |
| 
 | |
|     const/4 v6, 0x0
 | |
| 
 | |
|     if-ge v1, v4, :cond_5
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     const/16 v7, 0x2e
 | |
| 
 | |
|     const/4 v8, 0x1
 | |
| 
 | |
|     if-ne v4, v7, :cond_0
 | |
| 
 | |
|     move v2, v8
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_0
 | |
|     const/16 v7, 0x3a
 | |
| 
 | |
|     if-ne v4, v7, :cond_2
 | |
| 
 | |
|     if-eqz v2, :cond_1
 | |
| 
 | |
|     return-object v6
 | |
| 
 | |
|     :cond_1
 | |
|     move v3, v8
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_2
 | |
|     const/16 v7, 0x25
 | |
| 
 | |
|     if-ne v4, v7, :cond_3
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     :cond_3
 | |
|     const/16 v7, 0x10
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {v4, v7}, Ljava/lang/Character;->digit(CI)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     if-ne v4, v5, :cond_4
 | |
| 
 | |
|     return-object v6
 | |
| 
 | |
|     :cond_4
 | |
|     :goto_1
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_5
 | |
|     move v1, v5
 | |
| 
 | |
|     :goto_2
 | |
|     if-eqz v3, :cond_8
 | |
| 
 | |
|     if-eqz v2, :cond_6
 | |
| 
 | |
|     .line 4
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->convertDottedQuadToHex(Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-nez p0, :cond_6
 | |
| 
 | |
|     return-object v6
 | |
| 
 | |
|     :cond_6
 | |
|     if-eq v1, v5, :cond_7
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_7
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->textToNumericFormatV6(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_8
 | |
|     if-eqz v2, :cond_a
 | |
| 
 | |
|     if-eq v1, v5, :cond_9
 | |
| 
 | |
|     return-object v6
 | |
| 
 | |
|     .line 7
 | |
|     :cond_9
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->textToNumericFormatV4(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :cond_a
 | |
|     return-object v6
 | |
| .end method
 | |
| 
 | |
| .method public static is6to4Address(Ljava/net/Inet6Address;)Z
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     aget-byte v1, p0, v0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     const/16 v3, 0x20
 | |
| 
 | |
|     if-ne v1, v3, :cond_0
 | |
| 
 | |
|     aget-byte p0, p0, v2
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     if-ne p0, v1, :cond_0
 | |
| 
 | |
|     move v0, v2
 | |
| 
 | |
|     :cond_0
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public static isCompatIPv4Address(Ljava/net/Inet6Address;)Z
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->isIPv4CompatibleAddress()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     return v1
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0xc
 | |
| 
 | |
|     .line 3
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     if-nez v0, :cond_2
 | |
| 
 | |
|     const/16 v0, 0xd
 | |
| 
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     if-nez v0, :cond_2
 | |
| 
 | |
|     const/16 v0, 0xe
 | |
| 
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     if-nez v0, :cond_2
 | |
| 
 | |
|     const/16 v0, 0xf
 | |
| 
 | |
|     aget-byte v3, p0, v0
 | |
| 
 | |
|     if-eqz v3, :cond_1
 | |
| 
 | |
|     aget-byte p0, p0, v0
 | |
| 
 | |
|     if-ne p0, v2, :cond_2
 | |
| 
 | |
|     :cond_1
 | |
|     return v1
 | |
| 
 | |
|     :cond_2
 | |
|     return v2
 | |
| .end method
 | |
| 
 | |
| .method public static isInetAddress(Ljava/lang/String;)Z
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->ipStringToBytes(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static isIsatapAddress(Ljava/net/Inet6Address;)Z
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->isTeredoAddress(Ljava/net/Inet6Address;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     return v1
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0x8
 | |
| 
 | |
|     .line 3
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     const/4 v2, 0x3
 | |
| 
 | |
|     or-int/2addr v0, v2
 | |
| 
 | |
|     if-eq v0, v2, :cond_1
 | |
| 
 | |
|     return v1
 | |
| 
 | |
|     :cond_1
 | |
|     const/16 v0, 0x9
 | |
| 
 | |
|     .line 4
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     if-nez v0, :cond_2
 | |
| 
 | |
|     const/16 v0, 0xa
 | |
| 
 | |
|     aget-byte v0, p0, v0
 | |
| 
 | |
|     const/16 v2, 0x5e
 | |
| 
 | |
|     if-ne v0, v2, :cond_2
 | |
| 
 | |
|     const/16 v0, 0xb
 | |
| 
 | |
|     aget-byte p0, p0, v0
 | |
| 
 | |
|     const/4 v0, -0x2
 | |
| 
 | |
|     if-ne p0, v0, :cond_2
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     :cond_2
 | |
|     return v1
 | |
| .end method
 | |
| 
 | |
| .method public static isMappedIPv4Address(Ljava/lang/String;)Z
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->ipStringToBytes(Ljava/lang/String;)[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     if-eqz p0, :cond_4
 | |
| 
 | |
|     .line 2
 | |
|     array-length v1, p0
 | |
| 
 | |
|     const/16 v2, 0x10
 | |
| 
 | |
|     if-ne v1, v2, :cond_4
 | |
| 
 | |
|     move v1, v0
 | |
| 
 | |
|     :goto_0
 | |
|     const/16 v2, 0xa
 | |
| 
 | |
|     if-ge v1, v2, :cond_1
 | |
| 
 | |
|     .line 3
 | |
|     aget-byte v2, p0, v1
 | |
| 
 | |
|     if-eqz v2, :cond_0
 | |
| 
 | |
|     return v0
 | |
| 
 | |
|     :cond_0
 | |
|     add-int/lit8 v1, v1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_1
 | |
|     const/16 v1, 0xc
 | |
| 
 | |
|     if-ge v2, v1, :cond_3
 | |
| 
 | |
|     .line 4
 | |
|     aget-byte v1, p0, v2
 | |
| 
 | |
|     const/4 v3, -0x1
 | |
| 
 | |
|     if-eq v1, v3, :cond_2
 | |
| 
 | |
|     return v0
 | |
| 
 | |
|     :cond_2
 | |
|     add-int/lit8 v2, v2, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_3
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     return p0
 | |
| 
 | |
|     :cond_4
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public static isMaximum(Ljava/net/InetAddress;)Z
 | |
|     .locals 5
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 2
 | |
|     array-length v0, p0
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     move v2, v1
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge v2, v0, :cond_1
 | |
| 
 | |
|     aget-byte v3, p0, v2
 | |
| 
 | |
|     const/4 v4, -0x1
 | |
| 
 | |
|     if-eq v3, v4, :cond_0
 | |
| 
 | |
|     return v1
 | |
| 
 | |
|     :cond_0
 | |
|     add-int/lit8 v2, v2, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static isTeredoAddress(Ljava/net/Inet6Address;)Z
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Ljava/net/Inet6Address;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     aget-byte v1, p0, v0
 | |
| 
 | |
|     const/4 v2, 0x1
 | |
| 
 | |
|     const/16 v3, 0x20
 | |
| 
 | |
|     if-ne v1, v3, :cond_0
 | |
| 
 | |
|     aget-byte v1, p0, v2
 | |
| 
 | |
|     if-ne v1, v2, :cond_0
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     aget-byte v1, p0, v1
 | |
| 
 | |
|     if-nez v1, :cond_0
 | |
| 
 | |
|     const/4 v1, 0x3
 | |
| 
 | |
|     aget-byte p0, p0, v1
 | |
| 
 | |
|     if-nez p0, :cond_0
 | |
| 
 | |
|     move v0, v2
 | |
| 
 | |
|     :cond_0
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public static isUriInetAddress(Ljava/lang/String;)Z
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->forUriStringNoThrow(Ljava/lang/String;)Ljava/net/InetAddress;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method private static parseHextet(Ljava/lang/String;II)S
 | |
|     .locals 3
 | |
| 
 | |
|     sub-int v0, p2, p1
 | |
| 
 | |
|     if-lez v0, :cond_1
 | |
| 
 | |
|     const/4 v1, 0x4
 | |
| 
 | |
|     if-gt v0, v1, :cond_1
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge p1, p2, :cond_0
 | |
| 
 | |
|     shl-int/lit8 v0, v0, 0x4
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const/16 v2, 0x10
 | |
| 
 | |
|     invoke-static {v1, v2}, Ljava/lang/Character;->digit(CI)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     or-int/2addr v0, v1
 | |
| 
 | |
|     add-int/lit8 p1, p1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     int-to-short p0, v0
 | |
| 
 | |
|     return p0
 | |
| 
 | |
|     .line 2
 | |
|     :cond_1
 | |
|     new-instance p0, Ljava/lang/NumberFormatException;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/NumberFormatException;-><init>()V
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method private static parseOctet(Ljava/lang/String;II)B
 | |
|     .locals 3
 | |
| 
 | |
|     sub-int v0, p2, p1
 | |
| 
 | |
|     if-lez v0, :cond_5
 | |
| 
 | |
|     const/4 v1, 0x3
 | |
| 
 | |
|     if-gt v0, v1, :cond_5
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     if-le v0, v1, :cond_1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/16 v1, 0x30
 | |
| 
 | |
|     if-eq v0, v1, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 2
 | |
|     :cond_0
 | |
|     new-instance p0, Ljava/lang/NumberFormatException;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/NumberFormatException;-><init>()V
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     :goto_1
 | |
|     if-ge p1, p2, :cond_3
 | |
| 
 | |
|     mul-int/lit8 v0, v0, 0xa
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const/16 v2, 0xa
 | |
| 
 | |
|     invoke-static {v1, v2}, Ljava/lang/Character;->digit(CI)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-ltz v1, :cond_2
 | |
| 
 | |
|     add-int/2addr v0, v1
 | |
| 
 | |
|     add-int/lit8 p1, p1, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_2
 | |
|     new-instance p0, Ljava/lang/NumberFormatException;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/NumberFormatException;-><init>()V
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     :cond_3
 | |
|     const/16 p0, 0xff
 | |
| 
 | |
|     if-gt v0, p0, :cond_4
 | |
| 
 | |
|     int-to-byte p0, v0
 | |
| 
 | |
|     return p0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_4
 | |
|     new-instance p0, Ljava/lang/NumberFormatException;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/NumberFormatException;-><init>()V
 | |
| 
 | |
|     throw p0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_5
 | |
|     new-instance p0, Ljava/lang/NumberFormatException;
 | |
| 
 | |
|     invoke-direct {p0}, Ljava/lang/NumberFormatException;-><init>()V
 | |
| 
 | |
|     throw p0
 | |
| .end method
 | |
| 
 | |
| .method private static textToNumericFormatV4(Ljava/lang/String;)[B
 | |
|     .locals 7
 | |
|     .annotation runtime Ljavax/annotation/CheckForNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     sget-object v0, Lcom/google/common/net/InetAddresses;->IPV4_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     invoke-virtual {v0, p0}, Lcom/google/common/base/CharMatcher;->countIn(Ljava/lang/CharSequence;)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     add-int/lit8 v0, v0, 0x1
 | |
| 
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     const/4 v2, 0x4
 | |
| 
 | |
|     if-eq v0, v2, :cond_0
 | |
| 
 | |
|     return-object v1
 | |
| 
 | |
|     :cond_0
 | |
|     new-array v0, v2, [B
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     move v4, v3
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge v3, v2, :cond_2
 | |
| 
 | |
|     const/16 v5, 0x2e
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, v5, v4}, Ljava/lang/String;->indexOf(II)I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     const/4 v6, -0x1
 | |
| 
 | |
|     if-ne v5, v6, :cond_1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     .line 4
 | |
|     :cond_1
 | |
|     :try_start_0
 | |
|     invoke-static {p0, v4, v5}, Lcom/google/common/net/InetAddresses;->parseOctet(Ljava/lang/String;II)B
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     aput-byte v4, v0, v3
 | |
|     :try_end_0
 | |
|     .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     add-int/lit8 v4, v5, 0x1
 | |
| 
 | |
|     add-int/lit8 v3, v3, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catch_0
 | |
|     return-object v1
 | |
| 
 | |
|     :cond_2
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method private static textToNumericFormatV6(Ljava/lang/String;)[B
 | |
|     .locals 11
 | |
|     .annotation runtime Ljavax/annotation/CheckForNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     sget-object v0, Lcom/google/common/net/InetAddresses;->IPV6_DELIMITER_MATCHER:Lcom/google/common/base/CharMatcher;
 | |
| 
 | |
|     invoke-virtual {v0, p0}, Lcom/google/common/base/CharMatcher;->countIn(Ljava/lang/CharSequence;)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     if-lt v0, v1, :cond_f
 | |
| 
 | |
|     const/16 v3, 0x8
 | |
| 
 | |
|     if-le v0, v3, :cond_0
 | |
| 
 | |
|     goto/16 :goto_3
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     add-int/2addr v0, v4
 | |
| 
 | |
|     rsub-int/lit8 v5, v0, 0x8
 | |
| 
 | |
|     const/4 v6, 0x0
 | |
| 
 | |
|     move v7, v6
 | |
| 
 | |
|     move v8, v7
 | |
| 
 | |
|     .line 2
 | |
|     :goto_0
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v9
 | |
| 
 | |
|     sub-int/2addr v9, v4
 | |
| 
 | |
|     const/16 v10, 0x3a
 | |
| 
 | |
|     if-ge v7, v9, :cond_5
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v9
 | |
| 
 | |
|     if-ne v9, v10, :cond_4
 | |
| 
 | |
|     add-int/lit8 v9, v7, 0x1
 | |
| 
 | |
|     invoke-virtual {p0, v9}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v9
 | |
| 
 | |
|     if-ne v9, v10, :cond_4
 | |
| 
 | |
|     if-eqz v8, :cond_1
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     :cond_1
 | |
|     add-int/lit8 v5, v5, 0x1
 | |
| 
 | |
|     if-nez v7, :cond_2
 | |
| 
 | |
|     add-int/lit8 v5, v5, 0x1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_2
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v8
 | |
| 
 | |
|     sub-int/2addr v8, v1
 | |
| 
 | |
|     if-ne v7, v8, :cond_3
 | |
| 
 | |
|     add-int/lit8 v5, v5, 0x1
 | |
| 
 | |
|     :cond_3
 | |
|     move v8, v4
 | |
| 
 | |
|     :cond_4
 | |
|     add-int/lit8 v7, v7, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 5
 | |
|     :cond_5
 | |
|     invoke-virtual {p0, v6}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     if-ne v7, v10, :cond_6
 | |
| 
 | |
|     invoke-virtual {p0, v4}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     if-eq v7, v10, :cond_6
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     .line 6
 | |
|     :cond_6
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     sub-int/2addr v7, v4
 | |
| 
 | |
|     invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     if-ne v7, v10, :cond_7
 | |
| 
 | |
|     .line 7
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v7
 | |
| 
 | |
|     sub-int/2addr v7, v1
 | |
| 
 | |
|     invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eq v1, v10, :cond_7
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     :cond_7
 | |
|     if-eqz v8, :cond_8
 | |
| 
 | |
|     if-gtz v5, :cond_8
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     :cond_8
 | |
|     if-nez v8, :cond_9
 | |
| 
 | |
|     if-eq v0, v3, :cond_9
 | |
| 
 | |
|     return-object v2
 | |
| 
 | |
|     :cond_9
 | |
|     const/16 v0, 0x10
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     .line 9
 | |
|     :try_start_0
 | |
|     invoke-virtual {p0, v6}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-ne v1, v10, :cond_a
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_a
 | |
|     move v4, v6
 | |
| 
 | |
|     .line 10
 | |
|     :goto_1
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-ge v4, v1, :cond_e
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p0, v10, v4}, Ljava/lang/String;->indexOf(II)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     const/4 v3, -0x1
 | |
| 
 | |
|     if-ne v1, v3, :cond_b
 | |
| 
 | |
|     .line 12
 | |
|     invoke-virtual {p0}, Ljava/lang/String;->length()I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     .line 13
 | |
|     :cond_b
 | |
|     invoke-virtual {p0, v4}, Ljava/lang/String;->charAt(I)C
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     if-ne v3, v10, :cond_c
 | |
| 
 | |
|     move v3, v6
 | |
| 
 | |
|     :goto_2
 | |
|     if-ge v3, v5, :cond_d
 | |
| 
 | |
|     .line 14
 | |
|     invoke-virtual {v0, v6}, Ljava/nio/ByteBuffer;->putShort(S)Ljava/nio/ByteBuffer;
 | |
| 
 | |
|     add-int/lit8 v3, v3, 0x1
 | |
| 
 | |
|     goto :goto_2
 | |
| 
 | |
|     .line 15
 | |
|     :cond_c
 | |
|     invoke-static {p0, v4, v1}, Lcom/google/common/net/InetAddresses;->parseHextet(Ljava/lang/String;II)S
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     invoke-virtual {v0, v3}, Ljava/nio/ByteBuffer;->putShort(S)Ljava/nio/ByteBuffer;
 | |
|     :try_end_0
 | |
|     .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     :cond_d
 | |
|     add-int/lit8 v4, v1, 0x1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 16
 | |
|     :cond_e
 | |
|     invoke-virtual {v0}, Ljava/nio/ByteBuffer;->array()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     :catch_0
 | |
|     :cond_f
 | |
|     :goto_3
 | |
|     return-object v2
 | |
| .end method
 | |
| 
 | |
| .method public static toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
|     .locals 6
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     .line 2
 | |
|     instance-of v0, p0, Ljava/net/Inet4Address;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getHostAddress()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     instance-of v0, p0, Ljava/net/Inet6Address;
 | |
| 
 | |
|     invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/16 v0, 0x8
 | |
| 
 | |
|     new-array v1, v0, [I
 | |
| 
 | |
|     const/4 v2, 0x0
 | |
| 
 | |
|     move v3, v2
 | |
| 
 | |
|     :goto_0
 | |
|     if-ge v3, v0, :cond_1
 | |
| 
 | |
|     mul-int/lit8 v4, v3, 0x2
 | |
| 
 | |
|     .line 6
 | |
|     aget-byte v5, p0, v4
 | |
| 
 | |
|     add-int/lit8 v4, v4, 0x1
 | |
| 
 | |
|     aget-byte v4, p0, v4
 | |
| 
 | |
|     invoke-static {v2, v2, v5, v4}, Lcom/google/common/primitives/Ints;->fromBytes(BBBB)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     aput v4, v1, v3
 | |
| 
 | |
|     add-int/lit8 v3, v3, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 7
 | |
|     :cond_1
 | |
|     invoke-static {v1}, Lcom/google/common/net/InetAddresses;->compressLongestRunOfZeroes([I)V
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {v1}, Lcom/google/common/net/InetAddresses;->hextetsToIPv6String([I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static toBigInteger(Ljava/net/InetAddress;)Ljava/math/BigInteger;
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Ljava/math/BigInteger;
 | |
| 
 | |
|     invoke-virtual {p0}, Ljava/net/InetAddress;->getAddress()[B
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     invoke-direct {v0, v1, p0}, Ljava/math/BigInteger;-><init>(I[B)V
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public static toUriString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
|     .locals 3
 | |
| 
 | |
|     .line 1
 | |
|     instance-of v0, p0, Ljava/net/Inet6Address;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 v0, 0x2
 | |
| 
 | |
|     invoke-static {p0, v0}, Lcom/android/billingclient/api/d;->a(Ljava/lang/String;I)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     const-string v1, "["
 | |
| 
 | |
|     const-string v2, "]"
 | |
| 
 | |
|     invoke-static {v0, v1, p0, v2}, Lcom/google/android/gms/ads/internal/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-static {p0}, Lcom/google/common/net/InetAddresses;->toAddrString(Ljava/net/InetAddress;)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 |