關鍵字: J2ME
JSR 75, j2me
終于足球項目告一段落,期間學辛苦,無奈與成長都是可寫的。
在此期間我讓UI折騰的緊,甚至曾經想放棄,終究是堅持下來了。想想在一個小小的屏幕上設計一個UI已經是很痛苦的已經事情,何況在pc上設計,真是佩服死了那些高手們。
最近,時間比較有空,所以把UI修改了下,然后在此基礎上+jsr75規范做了個電子書閱讀軟件。等我設計好了以后,打算開源,大家共同學習,雖然寫的不好,各位高手多指教。現在發布一些讀取手機目錄的方法。
代碼
代碼
- package org.pook.file;
-
- import java.util.Enumeration;
- import java.util.Vector;
-
- import javax.microedition.io.file.FileSystemRegistry;
-
- import org.pook.log.Log;
-
- /**
- * <b>類名:BookFileManager.java</b> </br> 編寫日期: 2006-10-12 <br/> 程序功能描述: <br/>
- * Demo: <br/> Bug: <br/>
- *
- * 程序變更日期 :<br/> 變更作者 :<br/> 變更說明 :<br/>
- *
- * @author wuhua </br> <a href="mailto:rrq12345@163.com">rrq12345@163.com</a>
- */
- public class BookFileManager {
- private static Log log = Log.getLog("BookFileManager");
- public static boolean available() {
- String version = System
- .getProperty("microedition.io.file.FileConnection.version");
-
- if (version != null) {
- return true;
- } else {
- return false;
- }
-
- }
-
- public static BookFile openBookFile(String url) {
- return new BookFileImpl(url);
- }
-
-
-
-
- public static Vector listRoots() {
-
-
- Vector vc = null;
-
- Enumeration names = FileSystemRegistry.listRoots();
-
- vc = new Vector();
-
- while (names.hasMoreElements()) {
- vc.addElement(names.nextElement());
- //log.debug(names.nextElement());
- }
-
- return vc;
-
- }
-
- }