📄 mmsconfigurator.java
字号:
/*
* JVending - J2ME MMS Client
*
* Distributed under Apache style software license included with the source code.
*/
package org.jvending.mmsclient;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.rms.RecordStoreFullException;
import javax.microedition.rms.RecordStoreNotFoundException;
/**
* stores configuration information in the RMS
* @author Shane Isbell
* @version 1.0.0a
* @created 04/03/27
*/
public class MmsConfigurator {
private RecordStore recordStore;
private final int MMSC_ADDRESS = 0;
private String mmscAddress;
public void config() throws Exception {
recordStore = RecordStore.openRecordStore("mmsconfig", true);
mmscAddress = new String(recordStore.getRecord(MMSC_ADDRESS));
}
public void setAddress(String address) throws Exception {
byte[] b = address.getBytes();
recordStore.setRecord(MMSC_ADDRESS, b, 0, b.length);
this.mmscAddress = address;
}
public String getAddress() {
return mmscAddress;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -