.class public Lcom/alibaba/fastjson/util/IOUtils; .super Ljava/lang/Object; .source "IOUtils.java" # static fields .field public static final ASCII_CHARS:[C .field public static final CA:[C .field public static final DIGITS:[C .field static final DigitOnes:[C .field static final DigitTens:[C .field public static final IA:[I .field private static final charsBufLocal:Ljava/lang/ThreadLocal; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ThreadLocal<", "Ljava/lang/ref/SoftReference<", "[C>;>;" } .end annotation .end field .field private static final decoderLocal:Ljava/lang/ThreadLocal; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/lang/ThreadLocal<", "Ljava/nio/charset/CharsetDecoder;", ">;" } .end annotation .end field .field static final digits:[C .field public static final firstIdentifierFlags:[Z .field public static final identifierFlags:[Z .field public static final replaceChars:[C .field static final sizeTable:[I .field public static final specicalFlags_doubleQuotes:[B .field public static final specicalFlags_doubleQuotesFlags:[Z .field public static final specicalFlags_singleQuotes:[B .field public static final specicalFlags_singleQuotesFlags:[Z # direct methods .method static constructor ()V .locals 17 const/16 v0, 0x10 .line 38 new-array v0, v0, [C fill-array-data v0, :array_0 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->DIGITS:[C const/16 v0, 0x100 .line 41 new-array v1, v0, [Z sput-object v1, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z const/4 v1, 0x0 const/4 v2, 0x0 .line 43 :goto_0 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z array-length v3, v3 const/4 v4, 0x1 if-ge v2, v3, :cond_3 const/16 v3, 0x41 if-lt v2, v3, :cond_0 const/16 v3, 0x5a if-gt v2, v3, :cond_0 .line 45 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z aput-boolean v4, v3, v2 goto :goto_1 :cond_0 const/16 v3, 0x61 if-lt v2, v3, :cond_1 const/16 v3, 0x7a if-gt v2, v3, :cond_1 .line 47 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z aput-boolean v4, v3, v2 goto :goto_1 :cond_1 const/16 v3, 0x5f if-ne v2, v3, :cond_2 .line 49 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z aput-boolean v4, v3, v2 :cond_2 :goto_1 add-int/lit8 v2, v2, 0x1 int-to-char v2, v2 goto :goto_0 .line 54 :cond_3 new-array v2, v0, [Z sput-object v2, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z const/4 v2, 0x0 .line 57 :goto_2 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z array-length v3, v3 if-ge v2, v3, :cond_8 const/16 v3, 0x41 if-lt v2, v3, :cond_4 const/16 v3, 0x5a if-gt v2, v3, :cond_4 .line 59 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z aput-boolean v4, v3, v2 goto :goto_3 :cond_4 const/16 v3, 0x61 if-lt v2, v3, :cond_5 const/16 v3, 0x7a if-gt v2, v3, :cond_5 .line 61 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z aput-boolean v4, v3, v2 goto :goto_3 :cond_5 const/16 v3, 0x5f if-ne v2, v3, :cond_6 .line 63 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z aput-boolean v4, v3, v2 goto :goto_3 :cond_6 const/16 v3, 0x30 if-lt v2, v3, :cond_7 const/16 v3, 0x39 if-gt v2, v3, :cond_7 .line 65 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z aput-boolean v4, v3, v2 :cond_7 :goto_3 add-int/lit8 v2, v2, 0x1 int-to-char v2, v2 goto :goto_2 :cond_8 const/16 v2, 0xa1 .line 70 new-array v3, v2, [B sput-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B .line 71 new-array v3, v2, [B sput-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B .line 72 new-array v3, v2, [Z sput-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotesFlags:[Z .line 73 new-array v3, v2, [Z sput-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotesFlags:[Z const/16 v3, 0x5d .line 75 new-array v3, v3, [C sput-object v3, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C .line 77 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v5, 0x4 aput-byte v5, v3, v1 .line 78 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B aput-byte v5, v3, v4 .line 79 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v6, 0x2 aput-byte v5, v3, v6 .line 80 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v7, 0x3 aput-byte v5, v3, v7 .line 81 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B aput-byte v5, v3, v5 .line 82 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v8, 0x5 aput-byte v5, v3, v8 .line 83 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v9, 0x6 aput-byte v5, v3, v9 .line 84 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/4 v10, 0x7 aput-byte v5, v3, v10 .line 85 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v11, 0x8 aput-byte v4, v3, v11 .line 86 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v12, 0x9 aput-byte v4, v3, v12 .line 87 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v13, 0xa aput-byte v4, v3, v13 .line 88 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v14, 0xb aput-byte v5, v3, v14 .line 89 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v15, 0xc aput-byte v4, v3, v15 .line 90 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v15, 0xd aput-byte v4, v3, v15 .line 91 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v15, 0x22 aput-byte v4, v3, v15 .line 92 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B const/16 v15, 0x5c aput-byte v4, v3, v15 .line 94 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v1 .line 95 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v4 .line 96 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v6 .line 97 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v7 .line 98 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v5 .line 99 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v8 .line 100 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v9 .line 101 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v10 .line 102 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v4, v3, v11 .line 103 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v4, v3, v12 .line 104 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v4, v3, v13 .line 105 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v14 .line 106 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B const/16 v16, 0xc aput-byte v4, v3, v16 .line 107 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B const/16 v16, 0xd aput-byte v4, v3, v16 .line 108 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v4, v3, v15 .line 109 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B const/16 v16, 0x27 aput-byte v4, v3, v16 const/16 v3, 0xe :goto_4 const/16 v0, 0x1f if-gt v3, v0, :cond_9 .line 112 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B aput-byte v5, v0, v3 .line 113 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v0, v3 add-int/lit8 v3, v3, 0x1 goto :goto_4 :cond_9 const/16 v0, 0x7f :goto_5 const/16 v3, 0xa0 if-gt v0, v3, :cond_a .line 117 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B aput-byte v5, v3, v0 .line 118 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aput-byte v5, v3, v0 add-int/lit8 v0, v0, 0x1 goto :goto_5 :cond_a const/4 v0, 0x0 :goto_6 if-ge v0, v2, :cond_d .line 122 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotesFlags:[Z sget-object v16, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_doubleQuotes:[B aget-byte v16, v16, v0 if-eqz v16, :cond_b const/16 v16, 0x1 goto :goto_7 :cond_b const/16 v16, 0x0 :goto_7 aput-boolean v16, v3, v0 .line 123 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotesFlags:[Z sget-object v16, Lcom/alibaba/fastjson/util/IOUtils;->specicalFlags_singleQuotes:[B aget-byte v16, v16, v0 if-eqz v16, :cond_c const/16 v16, 0x1 goto :goto_8 :cond_c const/16 v16, 0x0 :goto_8 aput-boolean v16, v3, v0 add-int/lit8 v0, v0, 0x1 goto :goto_6 .line 126 :cond_d sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x30 aput-char v2, v0, v1 .line 127 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x31 aput-char v2, v0, v4 .line 128 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x32 aput-char v2, v0, v6 .line 129 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x33 aput-char v2, v0, v7 .line 130 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x34 aput-char v2, v0, v5 .line 131 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x35 aput-char v2, v0, v8 .line 132 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x36 aput-char v2, v0, v9 .line 133 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x37 aput-char v2, v0, v10 .line 134 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x62 aput-char v2, v0, v11 .line 135 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x74 aput-char v2, v0, v12 .line 136 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x6e aput-char v2, v0, v13 .line 137 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x76 aput-char v2, v0, v14 .line 138 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0xc const/16 v3, 0x66 aput-char v3, v0, v2 .line 139 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0xd const/16 v3, 0x72 aput-char v3, v0, v2 .line 140 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x22 const/16 v3, 0x22 aput-char v3, v0, v2 .line 141 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x27 const/16 v3, 0x27 aput-char v3, v0, v2 .line 142 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C const/16 v2, 0x2f const/16 v3, 0x2f aput-char v3, v0, v2 .line 143 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->replaceChars:[C aput-char v15, v0, v15 const/16 v0, 0x60 .line 146 new-array v0, v0, [C fill-array-data v0, :array_1 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->ASCII_CHARS:[C const/16 v0, 0x24 .line 287 new-array v0, v0, [C fill-array-data v0, :array_2 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->digits:[C const/16 v0, 0x64 .line 290 new-array v0, v0, [C fill-array-data v0, :array_3 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->DigitTens:[C const/16 v0, 0x64 .line 296 new-array v0, v0, [C fill-array-data v0, :array_4 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->DigitOnes:[C .line 302 new-array v0, v13, [I fill-array-data v0, :array_5 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->sizeTable:[I const-string v0, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" .line 341 invoke-virtual {v0}, Ljava/lang/String;->toCharArray()[C move-result-object v0 sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->CA:[C const/16 v0, 0x100 .line 342 new-array v0, v0, [I sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I .line 344 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I const/4 v2, -0x1 invoke-static {v0, v2}, Ljava/util/Arrays;->fill([II)V .line 345 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->CA:[C array-length v0, v0 const/4 v2, 0x0 :goto_9 if-ge v2, v0, :cond_e .line 346 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I sget-object v4, Lcom/alibaba/fastjson/util/IOUtils;->CA:[C aget-char v4, v4, v2 aput v2, v3, v4 add-int/lit8 v2, v2, 0x1 goto :goto_9 .line 347 :cond_e sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I const/16 v2, 0x3d aput v1, v0, v2 .line 539 new-instance v0, Ljava/lang/ThreadLocal; invoke-direct {v0}, Ljava/lang/ThreadLocal;->()V sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->charsBufLocal:Ljava/lang/ThreadLocal; .line 541 new-instance v0, Ljava/lang/ThreadLocal; invoke-direct {v0}, Ljava/lang/ThreadLocal;->()V sput-object v0, Lcom/alibaba/fastjson/util/IOUtils;->decoderLocal:Ljava/lang/ThreadLocal; return-void nop :array_0 .array-data 2 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x41s 0x42s 0x43s 0x44s 0x45s 0x46s .end array-data :array_1 .array-data 2 0x30s 0x30s 0x30s 0x31s 0x30s 0x32s 0x30s 0x33s 0x30s 0x34s 0x30s 0x35s 0x30s 0x36s 0x30s 0x37s 0x30s 0x38s 0x30s 0x39s 0x30s 0x41s 0x30s 0x42s 0x30s 0x43s 0x30s 0x44s 0x30s 0x45s 0x30s 0x46s 0x31s 0x30s 0x31s 0x31s 0x31s 0x32s 0x31s 0x33s 0x31s 0x34s 0x31s 0x35s 0x31s 0x36s 0x31s 0x37s 0x31s 0x38s 0x31s 0x39s 0x31s 0x41s 0x31s 0x42s 0x31s 0x43s 0x31s 0x44s 0x31s 0x45s 0x31s 0x46s 0x32s 0x30s 0x32s 0x31s 0x32s 0x32s 0x32s 0x33s 0x32s 0x34s 0x32s 0x35s 0x32s 0x36s 0x32s 0x37s 0x32s 0x38s 0x32s 0x39s 0x32s 0x41s 0x32s 0x42s 0x32s 0x43s 0x32s 0x44s 0x32s 0x45s 0x32s 0x46s .end array-data :array_2 .array-data 2 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x61s 0x62s 0x63s 0x64s 0x65s 0x66s 0x67s 0x68s 0x69s 0x6as 0x6bs 0x6cs 0x6ds 0x6es 0x6fs 0x70s 0x71s 0x72s 0x73s 0x74s 0x75s 0x76s 0x77s 0x78s 0x79s 0x7as .end array-data :array_3 .array-data 2 0x30s 0x30s 0x30s 0x30s 0x30s 0x30s 0x30s 0x30s 0x30s 0x30s 0x31s 0x31s 0x31s 0x31s 0x31s 0x31s 0x31s 0x31s 0x31s 0x31s 0x32s 0x32s 0x32s 0x32s 0x32s 0x32s 0x32s 0x32s 0x32s 0x32s 0x33s 0x33s 0x33s 0x33s 0x33s 0x33s 0x33s 0x33s 0x33s 0x33s 0x34s 0x34s 0x34s 0x34s 0x34s 0x34s 0x34s 0x34s 0x34s 0x34s 0x35s 0x35s 0x35s 0x35s 0x35s 0x35s 0x35s 0x35s 0x35s 0x35s 0x36s 0x36s 0x36s 0x36s 0x36s 0x36s 0x36s 0x36s 0x36s 0x36s 0x37s 0x37s 0x37s 0x37s 0x37s 0x37s 0x37s 0x37s 0x37s 0x37s 0x38s 0x38s 0x38s 0x38s 0x38s 0x38s 0x38s 0x38s 0x38s 0x38s 0x39s 0x39s 0x39s 0x39s 0x39s 0x39s 0x39s 0x39s 0x39s 0x39s .end array-data :array_4 .array-data 2 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s 0x30s 0x31s 0x32s 0x33s 0x34s 0x35s 0x36s 0x37s 0x38s 0x39s .end array-data :array_5 .array-data 4 0x9 0x63 0x3e7 0x270f 0x1869f 0xf423f 0x98967f 0x5f5e0ff 0x3b9ac9ff 0x7fffffff .end array-data .end method .method public constructor ()V .locals 0 .line 36 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method private static allocate(I)[C .locals 2 const/high16 v0, 0x20000 if-le p0, v0, :cond_0 .line 581 new-array p0, p0, [C return-object p0 :cond_0 ushr-int/lit8 v0, p0, 0xa if-gtz v0, :cond_1 const/16 p0, 0x400 goto :goto_0 :cond_1 const/4 v0, 0x1 sub-int/2addr p0, v0 .line 590 invoke-static {p0}, Ljava/lang/Integer;->numberOfLeadingZeros(I)I move-result p0 rsub-int/lit8 p0, p0, 0x20 shl-int p0, v0, p0 .line 593 :goto_0 new-array p0, p0, [C .line 594 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->charsBufLocal:Ljava/lang/ThreadLocal; new-instance v1, Ljava/lang/ref/SoftReference; invoke-direct {v1, p0}, Ljava/lang/ref/SoftReference;->(Ljava/lang/Object;)V invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V return-object p0 .end method .method public static clearChars()V .locals 2 .line 553 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->charsBufLocal:Ljava/lang/ThreadLocal; const/4 v1, 0x0 invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V return-void .end method .method public static close(Ljava/io/Closeable;)V .locals 0 if-eqz p0, :cond_0 .line 156 :try_start_0 invoke-interface {p0}, Ljava/io/Closeable;->close()V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 :cond_0 return-void .end method .method public static decode(Ljava/nio/charset/CharsetDecoder;Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)V .locals 1 const/4 v0, 0x1 .line 315 :try_start_0 invoke-virtual {p0, p1, p2, v0}, Ljava/nio/charset/CharsetDecoder;->decode(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult; move-result-object p1 .line 317 invoke-virtual {p1}, Ljava/nio/charset/CoderResult;->isUnderflow()Z move-result v0 if-nez v0, :cond_0 .line 318 invoke-virtual {p1}, Ljava/nio/charset/CoderResult;->throwException()V .line 321 :cond_0 invoke-virtual {p0, p2}, Ljava/nio/charset/CharsetDecoder;->flush(Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult; move-result-object p0 .line 323 invoke-virtual {p0}, Ljava/nio/charset/CoderResult;->isUnderflow()Z move-result p1 if-nez p1, :cond_1 .line 324 invoke-virtual {p0}, Ljava/nio/charset/CoderResult;->throwException()V :try_end_0 .catch Ljava/nio/charset/CharacterCodingException; {:try_start_0 .. :try_end_0} :catch_0 :cond_1 return-void :catch_0 move-exception p0 .line 329 new-instance p1, Lcom/alibaba/fastjson/JSONException; new-instance p2, Ljava/lang/StringBuilder; invoke-direct {p2}, Ljava/lang/StringBuilder;->()V const-string v0, "utf8 decode error, " invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p0}, Ljava/nio/charset/CharacterCodingException;->getMessage()Ljava/lang/String; move-result-object v0 invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-direct {p1, p2, p0}, Lcom/alibaba/fastjson/JSONException;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw p1 .end method .method public static decodeFast(Ljava/lang/String;)[B .locals 14 .line 484 invoke-virtual {p0}, Ljava/lang/String;->length()I move-result v0 const/4 v1, 0x0 if-nez v0, :cond_0 .line 486 new-array p0, v1, [B return-object p0 :cond_0 add-int/lit8 v2, v0, -0x1 const/4 v3, 0x0 :goto_0 if-ge v3, v2, :cond_1 .line 492 sget-object v4, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I invoke-virtual {p0, v3}, Ljava/lang/String;->charAt(I)C move-result v5 and-int/lit16 v5, v5, 0xff aget v4, v4, v5 if-gez v4, :cond_1 add-int/lit8 v3, v3, 0x1 goto :goto_0 :cond_1 :goto_1 if-lez v2, :cond_2 .line 496 sget-object v4, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C move-result v5 and-int/lit16 v5, v5, 0xff aget v4, v4, v5 if-gez v4, :cond_2 add-int/lit8 v2, v2, -0x1 goto :goto_1 .line 500 :cond_2 invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C move-result v4 const/16 v5, 0x3d const/4 v6, 0x1 if-ne v4, v5, :cond_4 add-int/lit8 v4, v2, -0x1 invoke-virtual {p0, v4}, Ljava/lang/String;->charAt(I)C move-result v4 if-ne v4, v5, :cond_3 const/4 v4, 0x2 goto :goto_2 :cond_3 const/4 v4, 0x1 goto :goto_2 :cond_4 const/4 v4, 0x0 :goto_2 sub-int v5, v2, v3 add-int/2addr v5, v6 const/16 v7, 0x4c if-le v0, v7, :cond_6 .line 502 invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C move-result v0 const/16 v7, 0xd if-ne v0, v7, :cond_5 div-int/lit8 v0, v5, 0x4e goto :goto_3 :cond_5 const/4 v0, 0x0 :goto_3 shl-int/2addr v0, v6 goto :goto_4 :cond_6 const/4 v0, 0x0 :goto_4 sub-int/2addr v5, v0 mul-int/lit8 v5, v5, 0x6 shr-int/lit8 v5, v5, 0x3 sub-int/2addr v5, v4 .line 505 new-array v7, v5, [B .line 509 div-int/lit8 v8, v5, 0x3 mul-int/lit8 v8, v8, 0x3 move v9, v3 const/4 v3, 0x0 const/4 v10, 0x0 :goto_5 if-ge v3, v8, :cond_8 .line 511 sget-object v11, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v12, v9, 0x1 invoke-virtual {p0, v9}, Ljava/lang/String;->charAt(I)C move-result v9 aget v9, v11, v9 shl-int/lit8 v9, v9, 0x12 sget-object v11, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v13, v12, 0x1 invoke-virtual {p0, v12}, Ljava/lang/String;->charAt(I)C move-result v12 aget v11, v11, v12 shl-int/lit8 v11, v11, 0xc or-int/2addr v9, v11 sget-object v11, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v12, v13, 0x1 invoke-virtual {p0, v13}, Ljava/lang/String;->charAt(I)C move-result v13 aget v11, v11, v13 shl-int/lit8 v11, v11, 0x6 or-int/2addr v9, v11 sget-object v11, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v13, v12, 0x1 .line 512 invoke-virtual {p0, v12}, Ljava/lang/String;->charAt(I)C move-result v12 aget v11, v11, v12 or-int/2addr v9, v11 add-int/lit8 v11, v3, 0x1 shr-int/lit8 v12, v9, 0x10 int-to-byte v12, v12 .line 515 aput-byte v12, v7, v3 add-int/lit8 v3, v11, 0x1 shr-int/lit8 v12, v9, 0x8 int-to-byte v12, v12 .line 516 aput-byte v12, v7, v11 add-int/lit8 v11, v3, 0x1 int-to-byte v9, v9 .line 517 aput-byte v9, v7, v3 if-lez v0, :cond_7 add-int/lit8 v10, v10, 0x1 const/16 v3, 0x13 if-ne v10, v3, :cond_7 add-int/lit8 v13, v13, 0x2 move v9, v13 const/4 v10, 0x0 goto :goto_6 :cond_7 move v9, v13 :goto_6 move v3, v11 goto :goto_5 :cond_8 if-ge v3, v5, :cond_a const/4 v0, 0x0 :goto_7 sub-int v8, v2, v4 if-gt v9, v8, :cond_9 .line 530 sget-object v8, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v10, v9, 0x1 invoke-virtual {p0, v9}, Ljava/lang/String;->charAt(I)C move-result v9 aget v8, v8, v9 mul-int/lit8 v9, v0, 0x6 rsub-int/lit8 v9, v9, 0x12 shl-int/2addr v8, v9 or-int/2addr v1, v8 add-int/2addr v0, v6 move v9, v10 goto :goto_7 :cond_9 const/16 p0, 0x10 :goto_8 if-ge v3, v5, :cond_a add-int/lit8 v0, v3, 0x1 shr-int v2, v1, p0 int-to-byte v2, v2 .line 533 aput-byte v2, v7, v3 add-int/lit8 p0, p0, -0x8 move v3, v0 goto :goto_8 :cond_a return-object v7 .end method .method public static decodeFast(Ljava/lang/String;II)[B .locals 12 const/4 v0, 0x0 if-nez p2, :cond_0 .line 419 new-array p0, v0, [B return-object p0 :cond_0 add-int v1, p1, p2 const/4 v2, 0x1 sub-int/2addr v1, v2 :goto_0 if-ge p1, v1, :cond_1 .line 425 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C move-result v4 aget v3, v3, v4 if-gez v3, :cond_1 add-int/lit8 p1, p1, 0x1 goto :goto_0 :cond_1 :goto_1 if-lez v1, :cond_2 .line 429 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C move-result v4 aget v3, v3, v4 if-gez v3, :cond_2 add-int/lit8 v1, v1, -0x1 goto :goto_1 .line 433 :cond_2 invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C move-result v3 const/16 v4, 0x3d if-ne v3, v4, :cond_4 add-int/lit8 v3, v1, -0x1 invoke-virtual {p0, v3}, Ljava/lang/String;->charAt(I)C move-result v3 if-ne v3, v4, :cond_3 const/4 v3, 0x2 goto :goto_2 :cond_3 const/4 v3, 0x1 goto :goto_2 :cond_4 const/4 v3, 0x0 :goto_2 sub-int v4, v1, p1 add-int/2addr v4, v2 const/16 v5, 0x4c if-le p2, v5, :cond_6 .line 435 invoke-virtual {p0, v5}, Ljava/lang/String;->charAt(I)C move-result p2 const/16 v5, 0xd if-ne p2, v5, :cond_5 div-int/lit8 p2, v4, 0x4e goto :goto_3 :cond_5 const/4 p2, 0x0 :goto_3 shl-int/2addr p2, v2 goto :goto_4 :cond_6 const/4 p2, 0x0 :goto_4 sub-int/2addr v4, p2 mul-int/lit8 v4, v4, 0x6 shr-int/lit8 v4, v4, 0x3 sub-int/2addr v4, v3 .line 438 new-array v5, v4, [B .line 442 div-int/lit8 v6, v4, 0x3 mul-int/lit8 v6, v6, 0x3 move v7, p1 const/4 p1, 0x0 const/4 v8, 0x0 :goto_5 if-ge p1, v6, :cond_8 .line 444 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v10, v7, 0x1 invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C move-result v7 aget v7, v9, v7 shl-int/lit8 v7, v7, 0x12 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v11, v10, 0x1 invoke-virtual {p0, v10}, Ljava/lang/String;->charAt(I)C move-result v10 aget v9, v9, v10 shl-int/lit8 v9, v9, 0xc or-int/2addr v7, v9 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v10, v11, 0x1 invoke-virtual {p0, v11}, Ljava/lang/String;->charAt(I)C move-result v11 aget v9, v9, v11 shl-int/lit8 v9, v9, 0x6 or-int/2addr v7, v9 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v11, v10, 0x1 invoke-virtual {p0, v10}, Ljava/lang/String;->charAt(I)C move-result v10 aget v9, v9, v10 or-int/2addr v7, v9 add-int/lit8 v9, p1, 0x1 shr-int/lit8 v10, v7, 0x10 int-to-byte v10, v10 .line 447 aput-byte v10, v5, p1 add-int/lit8 p1, v9, 0x1 shr-int/lit8 v10, v7, 0x8 int-to-byte v10, v10 .line 448 aput-byte v10, v5, v9 add-int/lit8 v9, p1, 0x1 int-to-byte v7, v7 .line 449 aput-byte v7, v5, p1 if-lez p2, :cond_7 add-int/lit8 v8, v8, 0x1 const/16 p1, 0x13 if-ne v8, p1, :cond_7 add-int/lit8 v11, v11, 0x2 move v7, v11 const/4 v8, 0x0 goto :goto_6 :cond_7 move v7, v11 :goto_6 move p1, v9 goto :goto_5 :cond_8 if-ge p1, v4, :cond_a const/4 p2, 0x0 :goto_7 sub-int v6, v1, v3 if-gt v7, v6, :cond_9 .line 462 sget-object v6, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v8, v7, 0x1 invoke-virtual {p0, v7}, Ljava/lang/String;->charAt(I)C move-result v7 aget v6, v6, v7 mul-int/lit8 v7, p2, 0x6 rsub-int/lit8 v7, v7, 0x12 shl-int/2addr v6, v7 or-int/2addr v0, v6 add-int/2addr p2, v2 move v7, v8 goto :goto_7 :cond_9 const/16 p0, 0x10 :goto_8 if-ge p1, v4, :cond_a add-int/lit8 p2, p1, 0x1 shr-int v1, v0, p0 int-to-byte v1, v1 .line 465 aput-byte v1, v5, p1 add-int/lit8 p0, p0, -0x8 move p1, p2 goto :goto_8 :cond_a return-object v5 .end method .method public static decodeFast([CII)[B .locals 12 const/4 v0, 0x0 if-nez p2, :cond_0 .line 364 new-array p0, v0, [B return-object p0 :cond_0 add-int v1, p1, p2 const/4 v2, 0x1 sub-int/2addr v1, v2 :goto_0 if-ge p1, v1, :cond_1 .line 370 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I aget-char v4, p0, p1 aget v3, v3, v4 if-gez v3, :cond_1 add-int/lit8 p1, p1, 0x1 goto :goto_0 :cond_1 :goto_1 if-lez v1, :cond_2 .line 374 sget-object v3, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I aget-char v4, p0, v1 aget v3, v3, v4 if-gez v3, :cond_2 add-int/lit8 v1, v1, -0x1 goto :goto_1 .line 378 :cond_2 aget-char v3, p0, v1 const/16 v4, 0x3d if-ne v3, v4, :cond_4 add-int/lit8 v3, v1, -0x1 aget-char v3, p0, v3 if-ne v3, v4, :cond_3 const/4 v3, 0x2 goto :goto_2 :cond_3 const/4 v3, 0x1 goto :goto_2 :cond_4 const/4 v3, 0x0 :goto_2 sub-int v4, v1, p1 add-int/2addr v4, v2 const/16 v5, 0x4c if-le p2, v5, :cond_6 .line 380 aget-char p2, p0, v5 const/16 v5, 0xd if-ne p2, v5, :cond_5 div-int/lit8 p2, v4, 0x4e goto :goto_3 :cond_5 const/4 p2, 0x0 :goto_3 shl-int/2addr p2, v2 goto :goto_4 :cond_6 const/4 p2, 0x0 :goto_4 sub-int/2addr v4, p2 mul-int/lit8 v4, v4, 0x6 shr-int/lit8 v4, v4, 0x3 sub-int/2addr v4, v3 .line 383 new-array v5, v4, [B .line 387 div-int/lit8 v6, v4, 0x3 mul-int/lit8 v6, v6, 0x3 move v7, p1 const/4 p1, 0x0 const/4 v8, 0x0 :goto_5 if-ge p1, v6, :cond_8 .line 389 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v10, v7, 0x1 aget-char v7, p0, v7 aget v7, v9, v7 shl-int/lit8 v7, v7, 0x12 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v11, v10, 0x1 aget-char v10, p0, v10 aget v9, v9, v10 shl-int/lit8 v9, v9, 0xc or-int/2addr v7, v9 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v10, v11, 0x1 aget-char v11, p0, v11 aget v9, v9, v11 shl-int/lit8 v9, v9, 0x6 or-int/2addr v7, v9 sget-object v9, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v11, v10, 0x1 aget-char v10, p0, v10 aget v9, v9, v10 or-int/2addr v7, v9 add-int/lit8 v9, p1, 0x1 shr-int/lit8 v10, v7, 0x10 int-to-byte v10, v10 .line 392 aput-byte v10, v5, p1 add-int/lit8 p1, v9, 0x1 shr-int/lit8 v10, v7, 0x8 int-to-byte v10, v10 .line 393 aput-byte v10, v5, v9 add-int/lit8 v9, p1, 0x1 int-to-byte v7, v7 .line 394 aput-byte v7, v5, p1 if-lez p2, :cond_7 add-int/lit8 v8, v8, 0x1 const/16 p1, 0x13 if-ne v8, p1, :cond_7 add-int/lit8 v11, v11, 0x2 move v7, v11 const/4 v8, 0x0 goto :goto_6 :cond_7 move v7, v11 :goto_6 move p1, v9 goto :goto_5 :cond_8 if-ge p1, v4, :cond_a const/4 p2, 0x0 :goto_7 sub-int v6, v1, v3 if-gt v7, v6, :cond_9 .line 407 sget-object v6, Lcom/alibaba/fastjson/util/IOUtils;->IA:[I add-int/lit8 v8, v7, 0x1 aget-char v7, p0, v7 aget v6, v6, v7 mul-int/lit8 v7, p2, 0x6 rsub-int/lit8 v7, v7, 0x12 shl-int/2addr v6, v7 or-int/2addr v0, v6 add-int/2addr p2, v2 move v7, v8 goto :goto_7 :cond_9 const/16 p0, 0x10 :goto_8 if-ge p1, v4, :cond_a add-int/lit8 p2, p1, 0x1 shr-int v1, v0, p0 int-to-byte v1, v1 .line 410 aput-byte v1, v5, p1 add-int/lit8 p0, p0, -0x8 move p1, p2 goto :goto_8 :cond_a return-object v5 .end method .method public static firstIdentifier(C)Z .locals 1 .line 334 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z array-length v0, v0 if-ge p0, v0, :cond_0 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->firstIdentifierFlags:[Z aget-boolean p0, v0, 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 getChars(BI[C)V .locals 4 if-gez p0, :cond_0 const/16 v0, 0x2d neg-int p0, p0 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 const v1, 0xcccd mul-int v1, v1, p0 ushr-int/lit8 v1, v1, 0x13 shl-int/lit8 v2, v1, 0x3 shl-int/lit8 v3, v1, 0x1 add-int/2addr v2, v3 sub-int/2addr p0, v2 add-int/lit8 p1, p1, -0x1 .line 275 sget-object v2, Lcom/alibaba/fastjson/util/IOUtils;->digits:[C aget-char p0, v2, p0 aput-char p0, p2, p1 if-nez v1, :cond_2 if-eqz v0, :cond_1 add-int/lit8 p1, p1, -0x1 .line 280 aput-char v0, p2, p1 :cond_1 return-void :cond_2 move p0, v1 goto :goto_0 .end method .method public static getChars(II[C)V .locals 4 if-gez p0, :cond_0 const/16 v0, 0x2d neg-int p0, p0 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 const/high16 v1, 0x10000 if-lt p0, v1, :cond_1 .line 237 div-int/lit8 v1, p0, 0x64 shl-int/lit8 v2, v1, 0x6 shl-int/lit8 v3, v1, 0x5 add-int/2addr v2, v3 shl-int/lit8 v3, v1, 0x2 add-int/2addr v2, v3 sub-int/2addr p0, v2 add-int/lit8 p1, p1, -0x1 .line 241 sget-object v2, Lcom/alibaba/fastjson/util/IOUtils;->DigitOnes:[C aget-char v2, v2, p0 aput-char v2, p2, p1 add-int/lit8 p1, p1, -0x1 .line 242 sget-object v2, Lcom/alibaba/fastjson/util/IOUtils;->DigitTens:[C aget-char p0, v2, p0 aput-char p0, p2, p1 move p0, v1 goto :goto_0 :cond_1 :goto_1 const v1, 0xcccd mul-int v1, v1, p0 ushr-int/lit8 v1, v1, 0x13 shl-int/lit8 v2, v1, 0x3 shl-int/lit8 v3, v1, 0x1 add-int/2addr v2, v3 sub-int/2addr p0, v2 add-int/lit8 p1, p1, -0x1 .line 250 sget-object v2, Lcom/alibaba/fastjson/util/IOUtils;->digits:[C aget-char p0, v2, p0 aput-char p0, p2, p1 if-nez v1, :cond_3 if-eqz v0, :cond_2 add-int/lit8 p1, p1, -0x1 .line 255 aput-char v0, p2, p1 :cond_2 return-void :cond_3 move p0, v1 goto :goto_1 .end method .method public static getChars(JI[C)V .locals 7 const-wide/16 v0, 0x0 cmp-long v2, p0, v0 if-gez v2, :cond_0 const/16 v0, 0x2d neg-long p0, p0 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 const-wide/32 v1, 0x7fffffff cmp-long v3, p0, v1 if-lez v3, :cond_1 const-wide/16 v1, 0x64 .line 186 div-long v1, p0, v1 const/4 v3, 0x6 shl-long v3, v1, v3 const/4 v5, 0x5 shl-long v5, v1, v5 add-long/2addr v3, v5 const/4 v5, 0x2 shl-long v5, v1, v5 add-long/2addr v3, v5 sub-long/2addr p0, v3 long-to-int p0, p0 add-int/lit8 p2, p2, -0x1 .line 190 sget-object p1, Lcom/alibaba/fastjson/util/IOUtils;->DigitOnes:[C aget-char p1, p1, p0 aput-char p1, p3, p2 add-int/lit8 p2, p2, -0x1 .line 191 sget-object p1, Lcom/alibaba/fastjson/util/IOUtils;->DigitTens:[C aget-char p0, p1, p0 aput-char p0, p3, p2 move-wide p0, v1 goto :goto_0 :cond_1 long-to-int p0, p0 :goto_1 const/high16 p1, 0x10000 if-lt p0, p1, :cond_2 .line 198 div-int/lit8 p1, p0, 0x64 shl-int/lit8 v1, p1, 0x6 shl-int/lit8 v2, p1, 0x5 add-int/2addr v1, v2 shl-int/lit8 v2, p1, 0x2 add-int/2addr v1, v2 sub-int/2addr p0, v1 add-int/lit8 p2, p2, -0x1 .line 202 sget-object v1, Lcom/alibaba/fastjson/util/IOUtils;->DigitOnes:[C aget-char v1, v1, p0 aput-char v1, p3, p2 add-int/lit8 p2, p2, -0x1 .line 203 sget-object v1, Lcom/alibaba/fastjson/util/IOUtils;->DigitTens:[C aget-char p0, v1, p0 aput-char p0, p3, p2 move p0, p1 goto :goto_1 :cond_2 :goto_2 const p1, 0xcccd mul-int p1, p1, p0 ushr-int/lit8 p1, p1, 0x13 shl-int/lit8 v1, p1, 0x3 shl-int/lit8 v2, p1, 0x1 add-int/2addr v1, v2 sub-int/2addr p0, v1 add-int/lit8 p2, p2, -0x1 .line 211 sget-object v1, Lcom/alibaba/fastjson/util/IOUtils;->digits:[C aget-char p0, v1, p0 aput-char p0, p3, p2 if-nez p1, :cond_4 if-eqz v0, :cond_3 add-int/lit8 p2, p2, -0x1 .line 216 aput-char v0, p3, p2 :cond_3 return-void :cond_4 move p0, p1 goto :goto_2 .end method .method public static getChars(I)[C .locals 2 .line 557 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->charsBufLocal:Ljava/lang/ThreadLocal; invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/ref/SoftReference; if-nez v0, :cond_0 .line 560 invoke-static {p0}, Lcom/alibaba/fastjson/util/IOUtils;->allocate(I)[C move-result-object p0 return-object p0 .line 563 :cond_0 invoke-virtual {v0}, Ljava/lang/ref/SoftReference;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, [C if-nez v0, :cond_1 .line 566 invoke-static {p0}, Lcom/alibaba/fastjson/util/IOUtils;->allocate(I)[C move-result-object p0 return-object p0 .line 569 :cond_1 array-length v1, v0 if-ge v1, p0, :cond_2 .line 570 invoke-static {p0}, Lcom/alibaba/fastjson/util/IOUtils;->allocate(I)[C move-result-object v0 :cond_2 return-object v0 .end method .method public static getUTF8Decoder()Ljava/nio/charset/CharsetDecoder; .locals 2 .line 544 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->decoderLocal:Ljava/lang/ThreadLocal; invoke-virtual {v0}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/nio/charset/CharsetDecoder; if-nez v0, :cond_0 .line 546 new-instance v0, Lcom/alibaba/fastjson/util/UTF8Decoder; invoke-direct {v0}, Lcom/alibaba/fastjson/util/UTF8Decoder;->()V .line 547 sget-object v1, Lcom/alibaba/fastjson/util/IOUtils;->decoderLocal:Ljava/lang/ThreadLocal; invoke-virtual {v1, v0}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V :cond_0 return-object v0 .end method .method public static isIdent(C)Z .locals 1 .line 338 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z array-length v0, v0 if-ge p0, v0, :cond_0 sget-object v0, Lcom/alibaba/fastjson/util/IOUtils;->identifierFlags:[Z aget-boolean p0, v0, 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 readAll(Ljava/io/Reader;)Ljava/lang/String; .locals 4 .line 604 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const/16 v1, 0x800 .line 607 :try_start_0 new-array v1, v1, [C .line 609 :goto_0 array-length v2, v1 const/4 v3, 0x0 invoke-virtual {p0, v1, v3, v2}, Ljava/io/Reader;->read([CII)I move-result v2 :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 if-gez v2, :cond_0 .line 619 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 return-object p0 .line 613 :cond_0 :try_start_1 invoke-virtual {v0, v1, v3, v2}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder; :try_end_1 .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0 goto :goto_0 :catch_0 move-exception p0 .line 616 new-instance v0, Lcom/alibaba/fastjson/JSONException; const-string v1, "read string from reader error" invoke-direct {v0, v1, p0}, Lcom/alibaba/fastjson/JSONException;->(Ljava/lang/String;Ljava/lang/Throwable;)V throw v0 .end method .method public static stringSize(I)I .locals 2 const/4 v0, 0x0 .line 307 :goto_0 sget-object v1, Lcom/alibaba/fastjson/util/IOUtils;->sizeTable:[I aget v1, v1, v0 if-gt p0, v1, :cond_0 add-int/lit8 v0, v0, 0x1 return v0 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 .end method .method public static stringSize(J)I .locals 6 const/4 v0, 0x1 const-wide/16 v1, 0xa move-wide v3, v1 :goto_0 const/16 v5, 0x13 if-ge v0, v5, :cond_1 cmp-long v5, p0, v3 if-gez v5, :cond_0 return v0 :cond_0 mul-long v3, v3, v1 add-int/lit8 v0, v0, 0x1 goto :goto_0 :cond_1 return v5 .end method .method public static toString(Ljava/io/InputStream;)Ljava/lang/String; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/Exception; } .end annotation .line 599 new-instance v0, Ljava/io/BufferedReader; new-instance v1, Ljava/io/InputStreamReader; invoke-direct {v1, p0}, Ljava/io/InputStreamReader;->(Ljava/io/InputStream;)V invoke-direct {v0, v1}, Ljava/io/BufferedReader;->(Ljava/io/Reader;)V .line 600 invoke-static {v0}, Lcom/alibaba/fastjson/util/IOUtils;->readAll(Ljava/io/Reader;)Ljava/lang/String; move-result-object p0 return-object p0 .end method