📄 yosamabin_n60$showscore.java
字号:
import javax.microedition.io.Connection;
import javax.microedition.io.HttpConnection;
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
class ShowScore extends Form
implements CommandListener
{
private String[][] score;
private String str;
private Command cmBack;
private Alert altErr;
int cnt;
HttpConnection c;
public static final int TOP = 10;
public static final int ROW = 10;
public static final int COL = 2;
private final YosamaBin_N60 this$0;
ShowScore()
{
super("Hall of fame");
this.this$0 = paramYosamaBin_N60;
this.cmBack = new Command("Back", 2, 1);
this.altErr = new Alert("Connection Error");
this.altErr.setString("Couldn't retrieve data from the server.");
this.altErr.setType(AlertType.ERROR);
this.altErr.setTimeout(1000);
setCommandListener(this);
}
public void scroll()
{
if (this.cnt == 1)
{
super.append("Please wait while retrieving online scores...");
getScore();
}
if (this.cnt > 0)
this.cnt += 1;
}
// ERROR //
public void getScore()
{
// Byte code:
// 0: aload_0
// 1: aconst_null
// 2: putfield 22 YosamaBin_N60$ShowScore:score [[Ljava/lang/String;
// 5: aload_0
// 6: bipush 11
// 8: iconst_2
// 9: multianewarray 23 2
// 13: putfield 22 YosamaBin_N60$ShowScore:score [[Ljava/lang/String;
// 16: aload_0
// 17: ldc 24
// 19: putfield 25 YosamaBin_N60$ShowScore:str Ljava/lang/String;
// 22: ldc 26
// 24: astore_1
// 25: aload_0
// 26: aload_1
// 27: invokestatic 27 javax/microedition/io/Connector:open (Ljava/lang/String;)Ljavax/microedition/io/Connection;
// 30: checkcast 28 javax/microedition/io/HttpConnection
// 33: putfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 36: aload_0
// 37: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 40: invokeinterface 30 1 0
// 45: astore_2
// 46: aload_0
// 47: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 50: invokeinterface 31 1 0
// 55: astore_3
// 56: aload_0
// 57: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 60: invokeinterface 32 1 0
// 65: l2i
// 66: istore 4
// 68: aload_0
// 69: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 72: invokeinterface 33 1 0
// 77: istore 5
// 79: iload 4
// 81: ifle +94 -> 175
// 84: iload 4
// 86: newarray byte
// 88: astore 6
// 90: aload_2
// 91: aload 6
// 93: invokevirtual 34 java/io/InputStream:read ([B)I
// 96: istore 7
// 98: iconst_0
// 99: istore 8
// 101: goto +36 -> 137
// 104: aload_0
// 105: new 35 java/lang/StringBuffer
// 108: dup
// 109: invokespecial 36 java/lang/StringBuffer:<init> ()V
// 112: aload_0
// 113: getfield 25 YosamaBin_N60$ShowScore:str Ljava/lang/String;
// 116: invokevirtual 37 java/lang/StringBuffer:append (Ljava/lang/String;)Ljava/lang/StringBuffer;
// 119: aload 6
// 121: iload 8
// 123: baload
// 124: i2c
// 125: invokevirtual 38 java/lang/StringBuffer:append (C)Ljava/lang/StringBuffer;
// 128: invokevirtual 39 java/lang/StringBuffer:toString ()Ljava/lang/String;
// 131: putfield 25 YosamaBin_N60$ShowScore:str Ljava/lang/String;
// 134: iinc 8 1
// 137: iload 8
// 139: aload 6
// 141: arraylength
// 142: if_icmplt -38 -> 104
// 145: goto +41 -> 186
// 148: aload_0
// 149: new 35 java/lang/StringBuffer
// 152: dup
// 153: invokespecial 36 java/lang/StringBuffer:<init> ()V
// 156: aload_0
// 157: getfield 25 YosamaBin_N60$ShowScore:str Ljava/lang/String;
// 160: invokevirtual 37 java/lang/StringBuffer:append (Ljava/lang/String;)Ljava/lang/StringBuffer;
// 163: iload 6
// 165: i2c
// 166: invokevirtual 38 java/lang/StringBuffer:append (C)Ljava/lang/StringBuffer;
// 169: invokevirtual 39 java/lang/StringBuffer:toString ()Ljava/lang/String;
// 172: putfield 25 YosamaBin_N60$ShowScore:str Ljava/lang/String;
// 175: aload_2
// 176: invokevirtual 40 java/io/InputStream:read ()I
// 179: dup
// 180: istore 6
// 182: iconst_m1
// 183: if_icmpne -35 -> 148
// 186: aload_0
// 187: invokespecial 41 YosamaBin_N60$ShowScore:formatScore ()V
// 190: aload_0
// 191: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 194: ifnull +20 -> 214
// 197: aload_0
// 198: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 201: invokeinterface 50 1 0
// 206: goto +8 -> 214
// 209: astore 11
// 211: goto +3 -> 214
// 214: goto +119 -> 333
// 217: astore_1
// 218: iconst_2
// 219: putstatic 43 YosamaBin_N60:a I
// 222: aload_0
// 223: getfield 3 YosamaBin_N60$ShowScore:this$0 LYosamaBin_N60;
// 226: getfield 44 YosamaBin_N60:display Ljavax/microedition/lcdui/Display;
// 229: aload_0
// 230: getfield 11 YosamaBin_N60$ShowScore:altErr Ljavax/microedition/lcdui/Alert;
// 233: invokevirtual 45 javax/microedition/lcdui/Display:setCurrent (Ljavax/microedition/lcdui/Displayable;)V
// 236: aload_0
// 237: getfield 3 YosamaBin_N60$ShowScore:this$0 LYosamaBin_N60;
// 240: getfield 44 YosamaBin_N60:display Ljavax/microedition/lcdui/Display;
// 243: aload_0
// 244: getfield 3 YosamaBin_N60$ShowScore:this$0 LYosamaBin_N60;
// 247: getfield 46 YosamaBin_N60:intro LYosamaBin_N60$Intro;
// 250: invokevirtual 45 javax/microedition/lcdui/Display:setCurrent (Ljavax/microedition/lcdui/Displayable;)V
// 253: goto +13 -> 266
// 256: aload_0
// 257: aload_0
// 258: invokevirtual 47 javax/microedition/lcdui/Form:size ()I
// 261: iconst_1
// 262: isub
// 263: invokevirtual 48 javax/microedition/lcdui/Form:delete (I)V
// 266: aload_0
// 267: invokevirtual 47 javax/microedition/lcdui/Form:size ()I
// 270: ifgt -14 -> 256
// 273: aload_1
// 274: invokevirtual 49 java/lang/Throwable:printStackTrace ()V
// 277: aload_0
// 278: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 281: ifnull +20 -> 301
// 284: aload_0
// 285: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 288: invokeinterface 50 1 0
// 293: goto +8 -> 301
// 296: astore 11
// 298: goto +3 -> 301
// 301: goto +32 -> 333
// 304: astore 9
// 306: aload_0
// 307: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 310: ifnull +20 -> 330
// 313: aload_0
// 314: getfield 29 YosamaBin_N60$ShowScore:c Ljavax/microedition/io/HttpConnection;
// 317: invokeinterface 50 1 0
// 322: goto +8 -> 330
// 325: astore 11
// 327: goto +3 -> 330
// 330: aload 9
// 332: athrow
// 333: return
//
// Exception table:
// from to target type
// 197 206 209 java/lang/Exception
// 0 190 217 java/lang/Exception
// 284 293 296 java/lang/Exception
// 0 190 304 finally
// 217 277 304 finally
// 304 306 304 finally
// 313 322 325 java/lang/Exception
}
private void formatScore()
{
try
{
super.delete(0);
int i = 0;
int j = 0;
this.score[i][j] = "";
for (int k = 0; k < this.str.length(); ++k)
if ((this.str.charAt(k) == '~') && (this.str.charAt(k + 1) == '~'))
{
if (j == 1)
{
++i;
j = 0;
}
this.score[i][(++j)] = "";
++k;
}
else
{
this.score[i][j] = this.score[i][j] + this.str.charAt(k);
}
try
{
while (super.size() > 0)
super.delete(super.size() - 1);
}
catch (Exception localException2)
{
}
super.append("Top 10 scores\n");
for (int l = 0; l < 10; ++l)
if ((this.score[l][0].length() != 0) || (this.score[l][0] != "null"))
super.append("" + (l + 1) + ". " + this.score[l][0] + " - " + this.score[l][1] + "\n");
this.cnt = 0;
}
catch (Exception localException1)
{
}
addCommand(this.cmBack);
}
public void commandAction(, Displayable paramDisplayable)
{
if (paramCommand == this.cmBack)
{
try
{
this.this$0.shwScr.c.close();
}
catch (Exception localException)
{
}
YosamaBin_N60.a = 2;
this.this$0.display.setCurrent(this.this$0.intro);
while (super.size() > 0)
super.delete(super.size() - 1);
removeCommand(this.cmBack);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -