📄 storage.java
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2005-4-9 12:51:47
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: Storage.java
//
package girl60;
import java.io.*;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
public class Storage
{
public Storage()
{
}
//
// public byte[] LoadByteArray(String fName, int id)
// {
// RecordStore rs = null;
// byte abyte0[];
// rs = RecordStore.openRecordStore(fName, true);
// if(rs.getNumRecords() == 0)
// {
// rs.addRecord(null, 0, 0);
// break MISSING_BLOCK_LABEL_62;
// }
// byte data[] = rs.getRecord(id);
// rs.closeRecordStore();
// if(data == null)
// break MISSING_BLOCK_LABEL_62;
// abyte0 = data;
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// Exception exception2;
// try
// {
// return abyte0;
// }
// catch(RecordStoreException rse) { }
// break MISSING_BLOCK_LABEL_80;
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// // Misplaced declaration of an exception variable
// catch(Exception exception2) { }
// break MISSING_BLOCK_LABEL_114;
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// break MISSING_BLOCK_LABEL_114;
// Exception exception;
// exception;
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception4) { }
// throw exception;
// return null;
// }
//
// public int[] LoadInt(String fName, int length, int id)
// {
// RecordStore rs;
// DataInputStream din;
// int buff[];
// rs = null;
// ByteArrayInputStream bin = null;
// din = null;
// buff = new int[length];
// rs = RecordStore.openRecordStore(fName, true);
// if(rs.getNumRecords() == 0)
// {
// rs.addRecord(null, 0, 0);
// } else
// {
// byte data[] = rs.getRecord(id);
// if(data != null)
// try
// {
// ByteArrayInputStream bin = new ByteArrayInputStream(data);
// din = new DataInputStream(bin);
// for(int i = 0; i < length; i++)
// buff[i] = din.readInt();
//
// din.close();
// }
// catch(IOException ioexception) { }
// }
// if(din != null)
// try
// {
// din.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// break MISSING_BLOCK_LABEL_217;
// RecordStoreException rse;
// rse;
// int ai[] = null;
// if(din != null)
// try
// {
// din.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception2) { }
// return ai;
// Exception exception;
// exception;
// if(din != null)
// try
// {
// din.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// throw exception;
// return buff;
// }
//
// public boolean SaveByteArray(String fName, byte newData[], int id)
// {
// RecordStore rs;
// DataOutputStream dout;
// rs = null;
// ByteArrayOutputStream bout = new ByteArrayOutputStream();
// dout = new DataOutputStream(bout);
// for(rs = RecordStore.openRecordStore(fName, true); rs.getNumRecords() < id; rs.addRecord(null, 0, 0));
// rs.setRecord(id, newData, 0, newData.length);
// rs.closeRecordStore();
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// break MISSING_BLOCK_LABEL_172;
// Exception e;
// e;
// boolean flag = false;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception2) { }
// return flag;
// Exception exception;
// exception;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// throw exception;
// return true;
// }
//
// public boolean SaveString(String fName, String newData, int id)
// {
// RecordStore rs;
// ByteArrayOutputStream bout;
// DataOutputStream dout;
// rs = null;
// bout = new ByteArrayOutputStream();
// dout = new DataOutputStream(bout);
// dout.writeUTF(newData);
// byte data[] = bout.toByteArray();
// for(rs = RecordStore.openRecordStore(fName, true); rs.getNumRecords() < id; rs.addRecord(null, 0, 0));
// rs.setRecord(id, data, 0, data.length);
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// break MISSING_BLOCK_LABEL_182;
// Exception e;
// e;
// boolean flag = false;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception2) { }
// return flag;
// Exception exception;
// exception;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// throw exception;
// return true;
// }
//
// public boolean SaveInt(String fName, int newData[], int id)
// {
// RecordStore rs;
// ByteArrayOutputStream bout;
// DataOutputStream dout;
// rs = null;
// bout = new ByteArrayOutputStream();
// dout = new DataOutputStream(bout);
// for(rs = RecordStore.openRecordStore(fName, true); rs.getNumRecords() < id; rs.addRecord(null, 0, 0));
// for(int i = 0; i < newData.length; i++)
// dout.writeInt(newData[i]);
//
// byte data[] = bout.toByteArray();
// rs.setRecord(id, data, 0, data.length);
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// break MISSING_BLOCK_LABEL_201;
// Exception e;
// e;
// boolean flag = false;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception2) { }
// return flag;
// Exception exception;
// exception;
// try
// {
// dout.flush();
// dout.close();
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// throw exception;
// return true;
// }
//
// public String GetStringData(String fName, int id)
// {
// return new String(LoadByteArray(fName, id));
// }
//
// public int GetNumRecord(String fName)
// {
// RecordStore rs = null;
// Exception e;
// rs = RecordStore.openRecordStore(fName, true);
// e = rs.getNumRecords();
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception1) { }
// try
// {
// return e;
// }
// catch(Exception e) { }
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception2) { }
// break MISSING_BLOCK_LABEL_63;
// Exception exception;
// exception;
// if(rs != null)
// try
// {
// rs.closeRecordStore();
// }
// catch(Exception exception3) { }
// throw exception;
// return 0;
// }
//
// public void DeleteData(String fName)
// {
// try
// {
// RecordStore.deleteRecordStore(fName);
// }
// catch(Exception e)
// {
// System.out.println("Delete Record Error!!!");
// }
// }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -