亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? file.java

?? 有關(guān)j2me的很好的例子可以研究一下
?? JAVA
字號:
/* *  @(#)File.java	1.5 01/05/01 * *  Copyright (c) 2001 Sun Microsystems, Inc., 901 San Antonio Road, *  Palo Alto, CA 94303, U.S.A.  All Rights Reserved. * *  Sun Microsystems, Inc. has intellectual property rights relating *  to the technology embodied in this software.  In particular, and *  without limitation, these intellectual property rights may include *  one or more U.S. patents, foreign patents, or pending *  applications.  Sun, Sun Microsystems, the Sun logo, Java, KJava, *  and all Sun-based and Java-based marks are trademarks or *  registered trademarks of Sun Microsystems, Inc.  in the United *  States and other countries. * *  This software is distributed under licenses restricting its use, *  copying, distribution, and decompilation.  No part of this *  software may be reproduced in any form by any means without prior *  written authorization of Sun and its licensors, if any. * *  FEDERAL ACQUISITIONS:  Commercial Software -- Government Users *  Subject to Standard License Terms and Conditions */package com.sun.midp.io.j2me.storage;import java.io.IOException;import java.util.Vector;import com.sun.midp.security.SecurityDomain;import com.sun.midp.security.Actions;import com.sun.midp.midlet.Scheduler;import com.sun.midp.midlet.MIDletSuite;/** * Provide the methods to manage files in a device's persistant storage. */public class File {    /** Table to speed up the unicodeToAsciiFilename conversion method. */    private static final char NUMS[] = {        '0', '1', '2', '3', '4', '5', '6', '7',        '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'    };    /** Caches the storage root to save repeated native method calls. */    private static String storageRoot = null;    /**     * Returns the root to build storage filenames including an needed     * file separators, abstracting difference of the file systems     * of development and device platforms. Note the root is never null.     *     * @return root of any filename for accessing device persistant     *         storage.      */    public static String getStorageRoot() {        if (storageRoot == null) {            storageRoot = initStorageRoot();        }         return storageRoot;    }    /**     * Convert a file name into a form that can be safely stored on     * an ANSI-compatible file system. All characters that are not     * [A-Za-z0-9] are converted into %uuuu, where uuuu is the hex     * representation of the character's unicode value. Note even     * though "_" is allowed it is converted because we use it for     * for internal purposes. Potential file separators are converted     * so the native layer does not have deal with sub-directory hierachies.     *     * @param str a string that may contain any character     * @return an equivalent string that contains only the "safe" characters.     */    public static String unicodeToAsciiFilename(String str) {        StringBuffer sbuf = new StringBuffer();        for (int i = 0; i < str.length(); i++) {            char c = str.charAt(i);            if ((c >= 'a' && c <= 'z') ||                (c >= '0' && c <= '9')) {                sbuf.append(c);            } else if (c >= 'A' && c <= 'Z') {		sbuf.append('#');		sbuf.append(c);	    } else {                int v = (int)(c & 0xffff);                sbuf.append('%');                sbuf.append(NUMS[(v & 0xf000) >> 12]);                sbuf.append(NUMS[(v & 0x0f00) >>  8]);                sbuf.append(NUMS[(v & 0x00f0) >>  4]);                sbuf.append(NUMS[(v & 0x000f) >>  0]);            }        }        return sbuf.toString();    }    /**     * Perform the reverse conversion of unicodeToAscii().     *     * @param str a string previously returned by escape()     * @return the original string before the conversion by escape().     */    public static String asciiFilenameToUnicode(String str) {        StringBuffer sbuf = new StringBuffer();        for (int i = 0; i < str.length(); i++) {            char c = str.charAt(i);            if (c == '%') {                int v = 0;                v <<= 4; v += hexValue(str.charAt(i+1));                v <<= 4; v += hexValue(str.charAt(i+2));                v <<= 4; v += hexValue(str.charAt(i+3));                v <<= 4; v += hexValue(str.charAt(i+4));                i += 4;                sbuf.append((char)(v & 0x0000ffff));            } else if (c == '#') {		// drop c	    } else {                sbuf.append(c);            }        }        return sbuf.toString();    }    /**     * A utility method that convert a hex character 0-9a-f to the     * numerical value represented by this hex char.     *     * @param c the character to convert     * @return the number represented by the character. E.g., '0' representes     * the number 0x0, 'a' representes the number 0x0a, etc.     */    private static int hexValue(char c) {        if (c >= '0' && c <= '9') {            return ((int)c) - '0';        } else {            return ((int)c) - 'a' + 10;        }    }    /**     * Converts <code>string</code> into a null terminated     * byte array.  Expects the characters in <code>string     * </code> to be in th Ascii range (0-127 base 10).     *     * @param string the string to convert     *     * @return byte array with contents of <code>string</code>     */    public static byte[] toCString(String string) {        int length = string.length();        byte[] cString = new byte[length + 1];        for (int i = 0; i < length; i++) {            cString[i] = (byte)string.charAt(i);        }        return cString;    }    /**     * Constructs a file object.     */    public File() {        MIDletSuite midletSuite = Scheduler.getScheduler().getMIDletSuite();        // if a MIDlet suite is not scheduled, assume the JAM is calling.        if (midletSuite != null) {            midletSuite.checkIfPermitted(Actions.DEVICE_CORE_FUNCTION);        }    }    /**     * Constructs a file object.     *     * @param callerSecurityDomain a SecurityDomain object     */    public File(SecurityDomain callerSecurityDomain) {        callerSecurityDomain.checkIfPermitted(Actions.DEVICE_CORE_FUNCTION);    }    /**     * Replaces the current name of storage, <code>oldName</code>     * with <code>newName</code>.     *     * @param oldName original name of storage file     * @param newName new name for storage file     * @exception IOException if an error occurs during rename     */    public synchronized void rename(String oldName, String newName)            throws IOException {        byte[] oldAsciiFilename = toCString(oldName);        byte[] newAsciiFilename = toCString(newName);        renameStorage(oldAsciiFilename, newAsciiFilename);    }    /**     * Returns <code>true</code> if storage file <code>name</code>     * exists.     *     * @param name name of storage file     *     * @return <code>true</code> if the named storage file exists     */    public synchronized boolean exists(String name) {        byte[] asciiFilename = toCString(name);        return storageExists(asciiFilename);    }    /**     * Finds the file names which start with prifix     * <code>root</code>.     *     * @param root prefix to match in file names     *     * @return a <code>Vector</code> containing the matching file names.     */    public synchronized Vector filenamesThatStartWith(String root) {        Vector list = new Vector();        byte[] szRoot;        String filename;        szRoot = toCString(root);        filename = getFirstFileThatStartsWith(szRoot);        while (filename != null) {            list.addElement(filename);            filename = getNextFileThatStartsWith(szRoot);        }        return list;    }    /**     * Remove a file from storage if it exists.     *     * @param name name of the file to delete     * @exception IOException if an error occurs during delete     */    public synchronized void delete(String name)            throws IOException {        byte[] asciiFilename = toCString(name);        deleteStorage(asciiFilename);    }    /**     * Retrieves the approximate space available to grow or     * create new storage files.     *     * @return approximate number of free bytes in storage     */    public int getBytesAvailableForFiles() {        return availableStorage();    }    /**     * Initializes storage root for this file instance.     *     * @return path of the storage root     */    private static native String initStorageRoot();    /**     * Renames storage file.     *     * @param szOldName old name of storage file     * @param szNewName new name for storage file     */    private static native void renameStorage(byte[] szOldName,                                             byte[] szNewName)        throws IOException;        /**     * Determines if a storage file matching szFilename exists.     *     * @param szFilename storage file to match     *     * @return <code>true</code> if storage indicated by      *         <code>szFilename</code> exists     */    private static native boolean storageExists(byte[] szFilename);    /**     * Removes storage file szFilename.     *     * @param szFilename storage file to delete     *     * @exception IOException if an error occurs during deletion     */    private static native void deleteStorage(byte[] szFilename)        throws IOException;    /**     * The calling method should be synchronzed and call     * getNextFileThatStartsWith until it returns null since     * they share static state information.     *     * @param szRoot prefix string to mach in return value     *     * @return the first storage file to contain <code>szRoot</code>     *         as a prefix     */    private static native String getFirstFileThatStartsWith(byte[] szRoot);    /**     * getFirstFileThatStartsWith must becalled first since it sets up     * some shared static state.     *     * @param szRoot prefix string to match in return value     *     * @return the 'next' storage file to contain <code>szRoot</code>     *         as a prefix     */    private static native String getNextFileThatStartsWith(byte[] szRoot);    /**     * Gets the approximate number of free storage bytes remaining.     *     * @return free storage space remaining, in bytes     */    private static native int availableStorage();}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲已满18点击进入久久| 国模大尺度一区二区三区| 久久精品99国产精品日本| caoporm超碰国产精品| 欧美一级艳片视频免费观看| 国产精品欧美一级免费| 九九在线精品视频| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 精品国产乱子伦一区| 亚洲777理论| 91香蕉视频mp4| 欧美国产精品一区| 精品亚洲国产成人av制服丝袜| 91色在线porny| 国产精品女主播在线观看| 国产精品12区| 久久色在线视频| 精品一区二区久久久| 日韩一区二区三区精品视频| 亚洲一级二级三级在线免费观看| 99久久99久久免费精品蜜臀| 中文字幕一区二区三| 国产91丝袜在线观看| 亚洲精品一区二区三区精华液| 青草国产精品久久久久久| 欧美高清一级片在线| 一区二区三区国产精华| 在线视频你懂得一区二区三区| 中文字幕一区二区5566日韩| 成人av动漫在线| 亚洲男人天堂av网| 欧美调教femdomvk| 日韩精品一二区| 日韩精品一区二区三区视频| 毛片av中文字幕一区二区| 日韩欧美精品在线视频| 精品制服美女久久| 久久久久青草大香线综合精品| 国产成人午夜99999| 国产精品青草久久| 日本二三区不卡| 亚洲成a人v欧美综合天堂| 欧美欧美欧美欧美| 日本不卡的三区四区五区| 日韩精品一区在线观看| 国产高清亚洲一区| 国产精品毛片久久久久久| 在线观看一区二区视频| 视频一区二区三区中文字幕| 欧美一区二区视频在线观看| 国产精品99久久久久久似苏梦涵| 国产精品美女久久久久aⅴ| 日本精品一区二区三区四区的功能| 一区二区三区蜜桃网| 日韩视频一区二区三区| 国产曰批免费观看久久久| 国产精品久久精品日日| 日本韩国一区二区| 男女男精品网站| 国产精品高清亚洲| 91精品国产品国语在线不卡| 岛国精品一区二区| 丝袜亚洲另类丝袜在线| 久久久国产午夜精品| 色婷婷久久99综合精品jk白丝| 香蕉av福利精品导航| 国产色一区二区| 欧美亚洲国产bt| 国产成人久久精品77777最新版本| 一区二区三区91| 337p粉嫩大胆噜噜噜噜噜91av| jlzzjlzz国产精品久久| 久久av资源网| 亚洲精品福利视频网站| 精品国产免费视频| 欧美三级一区二区| 成人午夜大片免费观看| 日韩va亚洲va欧美va久久| 1024亚洲合集| 久久综合久久99| 欧美精品少妇一区二区三区 | 亚洲精品五月天| 精品精品欲导航| 欧美日韩综合一区| 国产成人啪免费观看软件| 日韩国产精品久久久| 亚洲欧美日韩国产一区二区三区 | 欧美视频在线观看一区二区| 国产老肥熟一区二区三区| 亚洲成av人片观看| 亚洲精品视频自拍| 国产精品你懂的在线| 久久久亚洲午夜电影| 欧美日韩成人在线| 91蜜桃传媒精品久久久一区二区| 国产老女人精品毛片久久| 免费不卡在线观看| 亚洲高清一区二区三区| 亚洲精品欧美综合四区| 中文字幕日韩精品一区| 国产日韩欧美精品在线| 日韩欧美亚洲一区二区| 这里是久久伊人| 91麻豆精品国产91久久久久久久久 | 91国产成人在线| 91尤物视频在线观看| 成人免费的视频| 成人在线视频一区二区| 国产精品99久久久久久有的能看| 狠狠久久亚洲欧美| 国产在线精品一区二区三区不卡| 全国精品久久少妇| 美日韩一区二区| 久久丁香综合五月国产三级网站| 青青草国产成人av片免费| 秋霞午夜鲁丝一区二区老狼| 日韩电影网1区2区| 美女尤物国产一区| 国产中文字幕精品| 懂色av一区二区三区免费观看| 国产成人精品网址| 菠萝蜜视频在线观看一区| www.视频一区| 在线精品视频小说1| 欧美情侣在线播放| 精品美女在线播放| 国产亚洲欧美激情| 日韩伦理电影网| 亚洲va欧美va人人爽午夜| 日韩成人av影视| 国产麻豆成人精品| 色综合欧美在线视频区| 欧美美女一区二区在线观看| 91精品国产综合久久福利 | 国产精品久久久久久久浪潮网站| 欧美激情一区二区三区| 亚洲欧美aⅴ...| 日韩中文字幕1| 国产综合久久久久久鬼色| 成人丝袜高跟foot| 91黄色免费版| 日韩精品综合一本久道在线视频| 久久色.com| 一区二区在线观看av| 日韩精品亚洲一区| 国精产品一区一区三区mba视频| 成人av免费观看| 制服视频三区第一页精品| 久久亚洲免费视频| 一卡二卡欧美日韩| 极品美女销魂一区二区三区免费| 成人av网站在线观看免费| 欧美吞精做爰啪啪高潮| 久久亚洲一区二区三区明星换脸| 亚洲蜜臀av乱码久久精品 | av福利精品导航| 在线成人小视频| 国产精品午夜久久| 日韩不卡一区二区| 99九九99九九九视频精品| 91麻豆精品91久久久久久清纯| 国产亚洲一区二区在线观看| 亚洲小少妇裸体bbw| 高清免费成人av| 91精品国产品国语在线不卡| 中文字幕中文在线不卡住| 免费观看91视频大全| 色呦呦网站一区| 久久午夜色播影院免费高清 | 欧美日韩在线免费视频| 国产日韩欧美一区二区三区综合| 午夜精彩视频在线观看不卡| av在线播放一区二区三区| 777奇米成人网| 一区二区三区四区激情| 国产成人免费视频精品含羞草妖精| 欧美日韩在线三区| 亚洲精品乱码久久久久久日本蜜臀| 男人的天堂久久精品| 欧美日韩精品一区二区天天拍小说| 中文字幕巨乱亚洲| 狠狠色狠狠色综合日日91app| 欧美视频一区二区三区四区| 国产精品进线69影院| 国产呦萝稀缺另类资源| 日韩欧美高清一区| 人人爽香蕉精品| 9191久久久久久久久久久| 一区2区3区在线看| 日本高清免费不卡视频| 亚洲男人天堂一区| 色综合亚洲欧洲| 亚洲另类在线制服丝袜| 一本一本久久a久久精品综合麻豆| 国产欧美一区二区精品仙草咪| 韩国视频一区二区| 久久久精品tv| 成人福利在线看| 国产精品理论在线观看| 成人少妇影院yyyy|