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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? datamanager.java

?? Myjxta的源代碼 基于JXTA的P2P即時通信系統
?? JAVA
字號:
/* *  Copyright (c) 2001 Sun Microsystems, Inc.  All rights *  reserved. * *  Redistribution and use in source and binary forms, with or without *  modification, are permitted provided that the following conditions *  are met: * *  1. Redistributions of source code must retain the above copyright *  notice, this list of conditions and the following disclaimer. * *  2. Redistributions in binary form must reproduce the above copyright *  notice, this list of conditions and the following disclaimer in *  the documentation and/or other materials provided with the *  distribution. * *  3. The end-user documentation included with the redistribution, *  if any, must include the following acknowledgment: *  "This product includes software developed by the *  Sun Microsystems, Inc. for Project JXTA." *  Alternately, this acknowledgment may appear in the software itself, *  if and wherever such third-party acknowledgments normally appear. * *  4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" *  must not be used to endorse or promote products derived from this *  software without prior written permission. For written *  permission, please contact Project JXTA at http://www.jxta.org. * *  5. Products derived from this software may not be called "JXTA", *  nor may "JXTA" appear in their name, without prior written *  permission of Sun. * *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES *  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *  DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR *  ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF *  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, *  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT *  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF *  SUCH DAMAGE. *  ==================================================================== * *  This software consists of voluntary contributions made by many *  individuals on behalf of Project JXTA.  For more *  information on Project JXTA, please see *  <http://www.jxta.org/>. * *  This license is based on the BSD license adopted by the Apache Foundation. * *  $Id: DataManager.java,v 1.1 2006/06/13 07:02:30 nano Exp $ */package net.jxta.myjxta.misc.beam;//package  net.java.netbeams.store;import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;import java.io.InputStream;import java.net.URL;import java.util.Properties;public final class DataManager {    public static long lastModified(String path) {        try {            File f = new File(path);            if (f.exists()) return f.lastModified();        } catch (Exception e) {            e.printStackTrace();        }        return 0L;    }    public static void prepDirectory(String pathname) {        // make sure the file path up to last slash exists        String dirname = pathname.substring(0, pathname.lastIndexOf('/'));        if (dirname != null && dirname.length() >= 0) {            try {                File dir = new File(dirname);                if (!dir.exists()) dir.mkdirs();            } catch (Exception e) {            }        }    }    public static boolean fileExists(String path) {        boolean result = false;        try {            File f = new File(path);            if (f.exists()) result = true;        } catch (Exception e) {            e.printStackTrace();        }        return result;    }    public static Properties retrieveProperties(String path) {        Properties props = null;        try {            File ftmp = new File(path);            if (!ftmp.exists()) return null;            props = new Properties();            FileInputStream fin = new FileInputStream(path);            props.load(fin);            fin.close();        } catch (Exception e) {            e.printStackTrace();            return null;        }        return props;    }    public static Properties retrieveURLProperties(String urlstr) {        Properties props = null;        try {            URL url = new URL(urlstr);            props = new Properties();            InputStream urlin = url.openStream();            props.load(urlin);            urlin.close();        } catch (Exception e) {            e.printStackTrace();            return null;        }        return props;    }    public static String retrieveFile(String filename) {        String result = null;        try {            File file = new File(filename);            if (!file.exists()) return null;            int len = (int) file.length();            if (len >= 0) {                byte[] buf = new byte[len];                FileInputStream in = new FileInputStream(file);                int nbytes = 0;                int index = 0;                while (nbytes >= 0 && index < len) {                    nbytes = in.read(buf, index, len - index);                    index += nbytes;                }                in.close();                result = new String(buf);            }        } catch (Exception e) {            e.printStackTrace();        }        return result;    }    public static String retrieveURLFile(String urlstr) {        String result = null;        try {            URL url = new URL(urlstr);            byte[] buf = new byte[8192]; //start with 8kb buffer            InputStream in = url.openStream();            int nbytes = 0;            int index = 0;            while (nbytes >= 0 && index < buf.length) {                nbytes = in.read(buf, index, buf.length - index);                if (nbytes > 0) {                    index += nbytes;                    if (index == buf.length) {                        byte[] newbuf = new byte[2 * buf.length];                        System.arraycopy(buf, 0, newbuf, 0, index);                        buf = newbuf;                    }                }            }            in.close();            result = new String(buf, 0, 0, index);        } catch (Exception e) {            e.printStackTrace();        }        return result;    }    public static void saveProperties(Properties props, String path) {        if (props != null) {            try {                File file = new File(path);                if (file.exists()) {                    file.renameTo(new File(path + ".bak"));                } else {                    prepDirectory(path);                }                props.store(new FileOutputStream(path), "RSVP entry properties");            } catch (Exception e) {                e.printStackTrace();            }        }    }    public static synchronized void saveToFile(String data, String path) {        try {            File file = new File(path);            if (file.exists()) {                file.renameTo(new File(path + ".bak"));            } else {                prepDirectory(path);            }            FileOutputStream out = new FileOutputStream(path, false);            out.write(data.getBytes());            out.flush();            out.close();        } catch (Exception e) {            e.printStackTrace();        }    }    public static Properties[] getAllProperties(String path) {        return getAllProperties(path, Defs.PROPERTIES_FILE);    }    public static Properties[] getAllProperties(String path, String fname) {        File dir = new File(path);        String[] entries = dir.list();        if (entries != null && entries.length > 0) {            Properties[] props = new Properties[entries.length];            for (int i = 0; i < props.length; i++) {                props[i] = retrieveProperties(path + "/"                        + entries[i] + "/" + fname);            }            return props;        }        return null;    }    public static String[] getAllEntries(String path, String fname) {        String[] dirs = getAllEntries(path);        if (dirs != null && dirs.length > 0) {            String[] entries = new String[dirs.length];            for (int i = 0; i < entries.length; i++) {                entries[i] = retrieveFile(path + "/"                        + dirs[i] + "/" + fname);            }            return entries;        }        return null;    }    public static String[] getAllEntries(String path) {        File dir = new File(path);        String[] entries = dir.list();        return entries;    }    public static synchronized void delete(String dir, String trashdir) {        try {            File src = new File(dir);            File dest = new File(trashdir);            src.renameTo(dest);        } catch (Exception e) {            e.printStackTrace();        }    }    public static String canonicalizePath(String name) {        if (name == null) return null;        String fname = name.trim();        fname = fname.replace('/', '-');        fname = fname.replace(' ', '_');        fname = fname.replace('\\', '-');        fname = fname.replace('\t', '-');        fname = fname.replace('\'', '-');        fname = fname.replace('\"', '-');        fname = fname.replaceAll("_+", "_");        return fname;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久成人综合网| 欧美一级欧美一级在线播放| 欧美影视一区二区三区| 日韩美女视频在线| 亚洲一区二区三区视频在线 | 国产精品77777| 欧美美女激情18p| 国产精品夫妻自拍| 国产真实乱对白精彩久久| 欧美日韩在线电影| 亚洲欧美另类小说视频| 成人网页在线观看| xnxx国产精品| 麻豆一区二区三| 欧美电影在哪看比较好| 亚洲专区一二三| 99久久婷婷国产| 国产精品视频免费看| 国产麻豆成人精品| 精品国内片67194| 日本一不卡视频| 欧美日韩一区二区在线视频| 亚洲私人黄色宅男| 波多野洁衣一区| 欧美国产成人在线| 成人丝袜视频网| 亚洲国产精品99久久久久久久久| 九一久久久久久| 精品国产一区二区三区久久影院 | 日韩午夜在线观看| 亚洲国产精品影院| 欧美日韩免费一区二区三区| 亚洲欧美色综合| 在线观看亚洲a| 亚洲成人动漫精品| 69堂成人精品免费视频| 偷拍亚洲欧洲综合| 91精品国产综合久久香蕉麻豆| 亚洲国产精品久久久男人的天堂| 欧美影片第一页| 日韩av中文字幕一区二区三区 | 蜜臀99久久精品久久久久久软件| 欧美精品99久久久**| 亚洲国产高清在线观看视频| 高清国产一区二区| 日韩一区在线看| 91福利在线看| 蜜臂av日日欢夜夜爽一区| 26uuu亚洲综合色欧美| 国产精品正在播放| 亚洲欧美日韩在线不卡| 欧美色国产精品| 久久aⅴ国产欧美74aaa| 国产日韩av一区二区| 色一区在线观看| 午夜电影网一区| 精品黑人一区二区三区久久| 成人av免费在线观看| 天天综合色天天综合色h| 日韩你懂的电影在线观看| 国产精品综合一区二区三区| 国产精品久久久久aaaa樱花| 欧美日韩在线三区| 国产精品一区二区久久精品爱涩 | 色婷婷久久久久swag精品| 天堂一区二区在线| 国产午夜精品福利| 欧美午夜在线一二页| 蜜桃视频在线一区| 国产精品电影一区二区| 欧美麻豆精品久久久久久| 国产成人福利片| 亚洲成av人片在线| 国产精品久久精品日日| 91精品国产乱码| 91亚洲精华国产精华精华液| 喷白浆一区二区| 亚洲三级在线免费观看| 日韩欧美视频在线| 色狠狠桃花综合| 国产米奇在线777精品观看| 亚洲高清一区二区三区| 国产日韩精品久久久| 欧美一区二区三区免费| 色综合天天综合狠狠| 麻豆成人91精品二区三区| 亚洲精品日韩一| 国产天堂亚洲国产碰碰| 日韩午夜小视频| 欧美日韩免费高清一区色橹橹| 成人精品鲁一区一区二区| 奇米一区二区三区av| 亚洲一级二级三级在线免费观看| 国产欧美一区二区精品秋霞影院 | 中文字幕在线观看不卡视频| 欧美不卡在线视频| 91麻豆精品国产91久久久久久| 色噜噜狠狠成人中文综合| youjizz久久| 成人av在线网站| 国产成人综合在线观看| 激情综合色综合久久综合| 偷偷要91色婷婷| 婷婷久久综合九色综合绿巨人 | 亚洲图片另类小说| 久久精品视频在线看| 精品国内片67194| 日韩精品一区二区三区在线| 欧美一区二区三区免费大片| 91精品婷婷国产综合久久性色| 91成人网在线| 欧美视频日韩视频在线观看| 一本到一区二区三区| 色婷婷综合久色| 欧美专区日韩专区| 欧美亚洲动漫另类| 欧美精品少妇一区二区三区| 欧美乱妇20p| 欧美久久婷婷综合色| 欧美日韩一级二级三级| 在线成人小视频| 日韩欧美aaaaaa| 国产嫩草影院久久久久| 国产精品久久久久久久岛一牛影视| 亚洲国产精品av| 一区二区三区高清| 午夜精品久久久久久久99水蜜桃| 中文字幕在线不卡一区| 亚洲精品免费视频| 午夜视频在线观看一区| 久久精品国产99| 国产91丝袜在线播放| 色综合天天做天天爱| 欧美日韩中文字幕精品| 欧美tickling挠脚心丨vk| 国产视频一区二区三区在线观看| 国产精品久久三| 亚洲第一狼人社区| 久久99精品国产.久久久久久| 韩国毛片一区二区三区| 97久久精品人人做人人爽50路| 在线观看成人小视频| 欧美一区二区福利视频| 欧美激情综合在线| 一区二区三区蜜桃| 久久精品99国产精品| 99久久精品99国产精品| 欧美日韩国产123区| 精品日韩欧美一区二区| 亚洲欧美一区二区在线观看| 日韩在线卡一卡二| 国产69精品久久久久777| 欧美日韩一区久久| 国产肉丝袜一区二区| 亚洲成人在线免费| 国产大片一区二区| 欧美日韩卡一卡二| 中文字幕二三区不卡| 香蕉加勒比综合久久| 国产91丝袜在线18| 91精品国产日韩91久久久久久| 国产精品午夜在线观看| 午夜亚洲国产au精品一区二区| 国产成人在线影院| 欧美一级片免费看| 一区二区三区日韩欧美| 国产成人啪免费观看软件| 91精品婷婷国产综合久久性色| 国产精品每日更新| 国产最新精品免费| 欧美卡1卡2卡| 亚洲精品国久久99热| 国产在线视频不卡二| 欧美情侣在线播放| 亚洲猫色日本管| 成人精品免费看| 久久久久成人黄色影片| 午夜av一区二区三区| 色拍拍在线精品视频8848| 久久综合九色综合欧美就去吻| 香港成人在线视频| 色综合久久久久| 国产精品视频免费看| 狠狠v欧美v日韩v亚洲ⅴ| 91精品国产综合久久国产大片| 亚洲人一二三区| 99久久精品国产网站| 久久久.com| 国产乱国产乱300精品| 精品日韩成人av| 激情五月激情综合网| 欧美大片国产精品| www.综合网.com| 欧美高清在线一区| 国产盗摄一区二区三区| 国产三级三级三级精品8ⅰ区| 看电视剧不卡顿的网站| 日韩欧美综合一区| 九九九久久久精品| 精品国产乱码久久久久久牛牛 |