recordstoretest.java
来自「rms常用操作例子,可通过这些例子修改成你想要的代码,绝对有用!」· Java 代码 · 共 27 行
JAVA
27 行
import javax.microedition.midlet.*;
import javax.microedition.rms.*;
public class RecordStoreTest extends MIDlet {
public RecordStoreTest(){}
public void startApp()throws MIDletStateChangeException {
RecordStore rs=null;
try {
rs =RecordStore.openRecordStore("file1 ",true);
System.out.println("Record Store file1 is opened.");
}catch(Exception e){
System.out.println("Error:"+e.getMessage());
}finally{
//close the Record Store
try {
rs.closeRecordStore();
System.out.println("Record Store file1 is closed ");
}catch (Exception e){
System.out.println("Error:"+e.getMessage());
}
}
destroyApp(true);
notifyDestroyed();
}
public void pauseApp(){}
public void destroyApp(boolean unconditional){}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?