📄 eventloguploadui.java
字号:
package org.placelab.midp;import java.io.DataInputStream;import java.io.DataOutputStream;import javax.microedition.lcdui.Display;import javax.microedition.rms.RecordEnumeration;import org.placelab.midp.server.BluetoothService;public class EventLogUploadUI extends BluetoothClient { public EventLogUploadUI(Display display, UIComponent from) { super(display, from); } public String getName() { return "Event Log Uploader"; } public byte getServiceType() { return BluetoothService.ACTIVITY_UPLOAD_SERVICE; } public void handleConnection(DataInputStream in, DataOutputStream out) { setStatus("Connected to Event Log Downloader."); try { RecordEnumeration en = EventLogger.getRecords(null, null, false); updateStatus("Uploading " + en.numRecords() + " records...");// out.writeUTF(UberStore.getUserName());// out.writeUTF(UberStore.getUserNumber()); out.writeInt(en.numRecords()); while (en.hasNextElement()) { out.writeUTF(new String(en.nextRecord())); } out.flush(); out.close(); // updateStatus("Deleting records...");// deleteAll(); } catch (Exception e) { updateStatus("Error: " + e); } updateStatus("Finished Uploading."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -