📄 rmsgamescores.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
import java.io.*;
import javax.microedition.rms.*;
public class RMSGameScores
implements RecordFilter, RecordComparator
{
public static String playerNameFilter = null;
private RecordStore _$314;
public RMSGameScores()
{
_$314 = null;
try
{
_$314 = RecordStore.openRecordStore("globalwhi", false);
}
catch(Exception exception)
{
try
{
_$314 = RecordStore.openRecordStore("globalwhi", true);
addScore(900, "-----");
addScore(700, "-----");
addScore(600, "-----");
addScore(500, "-----");
addScore(400, "-----");
addScore(300, "-----");
addScore(200, "-----");
addScore(100, "-----");
addScore(0, "-----");
}
catch(Exception exception1) { }
}
}
public void addScore(int i, String s)
{
ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
DataOutputStream dataoutputstream = new DataOutputStream(bytearrayoutputstream);
try
{
dataoutputstream.writeInt(i);
dataoutputstream.writeUTF(s);
}
catch(Exception exception) { }
byte abyte0[] = bytearrayoutputstream.toByteArray();
try
{
_$314.addRecord(abyte0, 0, abyte0.length);
}
catch(Exception exception1) { }
}
public int compare(byte abyte0[], byte abyte1[])
{
ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
ByteArrayInputStream bytearrayinputstream1 = new ByteArrayInputStream(abyte1);
DataInputStream datainputstream1 = new DataInputStream(bytearrayinputstream1);
int i = 0;
int j = 0;
try
{
i = datainputstream.readInt();
j = datainputstream1.readInt();
}
catch(Exception exception) { }
if(j < i)
return -1;
return j <= i ? 0 : 1;
}
public boolean matches(byte abyte0[])
throws IllegalArgumentException
{
RMSGameScores _tmp = this;
if(playerNameFilter == null)
return false;
ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(abyte0);
DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
String s = null;
try
{
int i = datainputstream.readInt();
s = datainputstream.readUTF();
}
catch(Exception exception) { }
RMSGameScores _tmp1 = this;
return playerNameFilter.equals(s);
}
public void printScores(String as[], String as1[])
{
try
{
RecordEnumeration recordenumeration = _$314.enumerateRecords(null, this, true);
_$349(recordenumeration, as, as1);
}
catch(Exception exception) { }
}
private void _$349(RecordEnumeration recordenumeration, String as[], String as1[])
{
for(int i = 0; i < as.length; i++)
{
if(as[i] == null)
as[i] = new String();
else
as[i] = "";
if(as1[i] == null)
as1[i] = new String();
else
as1[i] = "";
}
try
{
for(int j = 0; recordenumeration.hasNextElement() && j < as.length;)
{
int k = recordenumeration.nextRecordId();
ByteArrayInputStream bytearrayinputstream = new ByteArrayInputStream(_$314.getRecord(k));
DataInputStream datainputstream = new DataInputStream(bytearrayinputstream);
try
{
int l = datainputstream.readInt();
String s = datainputstream.readUTF();
as[j] = s;
as1[j] = String.valueOf(l);
j++;
}
catch(Exception exception1) { }
}
}
catch(Exception exception) { }
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -