Advertisement
riskey95

Method Get Processor

May 21st, 2013
849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
J 4.19 KB | None | 0 0
  1. .method private getProcessor()Ljava/lang/String;
  2.     .locals 9
  3.  
  4.     .prologue
  5.     const/4 v8, 0x1
  6.  
  7.     .line 418
  8.     const/4 v0, 0x0
  9.  
  10.     .line 419
  11.     .local v0, info:[Ljava/lang/String;
  12.     const/4 v3, 0x0
  13.  
  14.     .line 423
  15.     .local v3, reader:Ljava/io/BufferedReader;
  16.     :try_start_0
  17.     new-instance v4, Ljava/io/BufferedReader;
  18.  
  19.     new-instance v5, Ljava/io/InputStreamReader;
  20.  
  21.     .line 424
  22.     new-instance v6, Ljava/io/FileInputStream;
  23.  
  24.     const-string v7, "/proc/cpuinfo"
  25.  
  26.     invoke-direct {v6, v7}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V
  27.  
  28.     invoke-direct {v5, v6}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
  29.  
  30.     const/16 v6, 0x3e8
  31.  
  32.     .line 423
  33.     invoke-direct {v4, v5, v6}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
  34.     :try_end_0
  35.     .catchall {:try_start_0 .. :try_end_0} :catchall_0
  36.     .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
  37.  
  38.     .line 427
  39.     .end local v3           #reader:Ljava/io/BufferedReader;
  40.     .local v4, reader:Ljava/io/BufferedReader;
  41.     :try_start_1
  42.     invoke-virtual {v4}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
  43.  
  44.     move-result-object v2
  45.  
  46.     .line 430
  47.     .local v2, line:Ljava/lang/String;
  48.     const-string v5, ":"
  49.  
  50.     invoke-virtual {v2, v5}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
  51.     :try_end_1
  52.     .catchall {:try_start_1 .. :try_end_1} :catchall_1
  53.     .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_4
  54.  
  55.     move-result-object v0
  56.  
  57.     .line 438
  58.     :try_start_2
  59.     invoke-virtual {v4}, Ljava/io/BufferedReader;->close()V
  60.     :try_end_2
  61.     .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3
  62.  
  63.     .line 441
  64.     :goto_0
  65.     const/4 v3, 0x0
  66.  
  67.     .line 444
  68.     .end local v2           #line:Ljava/lang/String;
  69.     .end local v4           #reader:Ljava/io/BufferedReader;
  70.     .restart local v3       #reader:Ljava/io/BufferedReader;
  71.     :goto_1
  72.     aget-object v5, v0, v8
  73.  
  74.     return-object v5
  75.  
  76.     .line 431
  77.     :catch_0
  78.     move-exception v1
  79.  
  80.     .line 432
  81.     .local v1, io:Ljava/io/IOException;
  82.     :goto_2
  83.     :try_start_3
  84.     invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
  85.  
  86.     .line 433
  87.     const/4 v5, 0x1
  88.  
  89.     new-array v0, v5, [Ljava/lang/String;
  90.  
  91.     .line 434
  92.     const/4 v5, 0x1
  93.  
  94.     const-string v6, "error"
  95.  
  96.     aput-object v6, v0, v5
  97.     :try_end_3
  98.     .catchall {:try_start_3 .. :try_end_3} :catchall_0
  99.  
  100.     .line 438
  101.     :try_start_4
  102.     invoke-virtual {v3}, Ljava/io/BufferedReader;->close()V
  103.     :try_end_4
  104.     .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_1
  105.  
  106.     .line 441
  107.     :goto_3
  108.     const/4 v3, 0x0
  109.  
  110.     goto :goto_1
  111.  
  112.     .line 435
  113.     .end local v1           #io:Ljava/io/IOException;
  114.     :catchall_0
  115.     move-exception v5
  116.  
  117.     .line 438
  118.     :goto_4
  119.     :try_start_5
  120.     invoke-virtual {v3}, Ljava/io/BufferedReader;->close()V
  121.     :try_end_5
  122.     .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_2
  123.  
  124.     .line 441
  125.     :goto_5
  126.     const/4 v3, 0x0
  127.  
  128.     .line 442
  129.     throw v5
  130.  
  131.     .line 439
  132.     .restart local v1       #io:Ljava/io/IOException;
  133.     :catch_1
  134.     move-exception v5
  135.  
  136.     goto :goto_3
  137.  
  138.     .end local v1           #io:Ljava/io/IOException;
  139.     :catch_2
  140.     move-exception v6
  141.  
  142.     goto :goto_5
  143.  
  144.     .end local v3           #reader:Ljava/io/BufferedReader;
  145.     .restart local v2       #line:Ljava/lang/String;
  146.     .restart local v4       #reader:Ljava/io/BufferedReader;
  147.     :catch_3
  148.     move-exception v5
  149.  
  150.     goto :goto_0
  151.  
  152.     .line 435
  153.     .end local v2           #line:Ljava/lang/String;
  154.     :catchall_1
  155.     move-exception v5
  156.  
  157.     move-object v3, v4
  158.  
  159.     .end local v4           #reader:Ljava/io/BufferedReader;
  160.     .restart local v3       #reader:Ljava/io/BufferedReader;
  161.     goto :goto_4
  162.  
  163.     .line 431
  164.     .end local v3           #reader:Ljava/io/BufferedReader;
  165.     .restart local v4       #reader:Ljava/io/BufferedReader;
  166.     :catch_4
  167.     move-exception v1
  168.  
  169.     move-object v3, v4
  170.  
  171.     .end local v4           #reader:Ljava/io/BufferedReader;
  172.     .restart local v3       #reader:Ljava/io/BufferedReader;
  173.     goto :goto_2
  174. .end method
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement