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

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

?? binaryfile.java

?? openmap java寫的開源數(shù)字地圖程序. 用applet實(shí)現(xiàn),可以像google map 那樣放大縮小地圖.
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
// **********************************************************************// // <copyright>// //  BBN Technologies//  10 Moulton Street//  Cambridge, MA 02138//  (617) 873-8000// //  Copyright (C) BBNT Solutions LLC. All rights reserved.// // </copyright>// **********************************************************************// // $Source: /cvs/distapps/openmap/src/openmap/com/bbn/openmap/io/BinaryFile.java,v $// $RCSfile: BinaryFile.java,v $// $Revision: 1.4.2.4 $// $Date: 2005/09/13 14:28:48 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.io;import java.io.*;import java.net.*;import java.util.Vector;import java.lang.ref.WeakReference;import com.bbn.openmap.Environment;import com.bbn.openmap.MoreMath;import com.bbn.openmap.util.Debug;/** * The BinaryFile is the standard object used to access data files. It * acts like a RandomAccessFile, but will work on jar file contents * and URLs, too. The source of the data is isolated through the * InputReader interface. */public class BinaryFile {    private static int openCount = 0;    private static int classCount = 0;    private InputReader inputReader = null;    /**     * The byte order of the underlying file. (<code>true</code>==     * MSB-First == big-endian)     */    protected boolean MSBFirst = false;    /**     * Constructs a new BinaryFile with the specified file as the     * input. The default byte-order is LSB first. Reads start at the     * first byte of the file.     *      * @param f the file to be opened for reading     * @exception IOException pass-through errors from opening a     *            RandomAccessFile with f     * @see java.io.RandomAccessFile     */    public BinaryFile(File f) throws IOException {        inputReader = new FileInputReader(f);        classCount++;        openCount++;    }    /**     * Constructs a new BinaryFile with the specified file as the     * input. The byte-order is undefined. Reads start at the first     * byte of the file. This constructor looks for the file with the     * string given, and will call the correct constructor as     * appropriate. If the string represents a file available locally,     * then the BinaryFile will be accessed with a FileInputReader     * using a RandomAccessFile. If it's only available as a resource,     * then a StreamInputReader will be used. The name should be a     * path to a file, or the name of a resource that can be found in     * the classpath, or a URL.     *      * @param name the name of the file to be opened for reading     * @exception IOException pass-through errors from opening the     *            file.     */    public BinaryFile(String name) throws IOException {        boolean showDebug = false;        if (Debug.debugging("binaryfile")) {            showDebug = true;        }        if (showDebug) {            Debug.output("BinaryFile: trying to figure out how to handle "                    + name);        }        try {            File file = null;            URL url = null;            if (!Environment.isApplet()) {                file = new File(name);            }            if (file != null && file.exists()) {                // If the string represents a file, then we want to                // use the RandomAccessFile aspect of the BinaryFile.                setInputReader(new FileInputReader(file));            } else {                // url = ClassLoader.getSystemResource(name);                url = Thread.currentThread()                        .getContextClassLoader()                        .getResource(name);                // OK, now we want to look around for the file, in the                // classpaths, and as a resource. It may be a file in                // a classpath, available for direct access.                if (url != null) {                    String newname = url.getFile();                    if (showDebug) {                        Debug.output("BinaryFile: looking for " + newname);                    }                    if (!Environment.isApplet()) {                        file = new File(newname);                    }                    if (file != null && file.exists()) {                        // It's still a file, available directly.                        // Access it with the RandomAccessFile                        setInputReader(new FileInputReader(file));                    } else {                        // Need to get it as a resource. Needs                        // special handling if it's coming in a jar                        // file. Jar file references have a "!" in                        // them                        if (!setJarInputReader(newname)) {                            if (showDebug) {                                Debug.output(" trying as url: " + url);                            }                            setInputReader(new URLInputReader(url));                        }                    }                } else if (Environment.isApplet()) {                    if (showDebug) {                        Debug.output(" As applet, checking codebase...");                    }                    // Look in the codebase for applets...                    URL[] cba = new URL[1];                    cba[0] = Environment.getApplet().getCodeBase();                    URLClassLoader ucl = URLClassLoader.newInstance(cba);                    url = ucl.getResource(name);                    if (url != null) {                        setInputReader(new URLInputReader(url));                    }                }                // It's not in the classpath, so try it as a URL.                if (inputReader == null) {                    if (showDebug) {                        Debug.output(" lastly, trying as URL: " + name);                    }                    try {                        setInputReader(new URLInputReader(new URL(name)));                    } catch (java.security.AccessControlException ace) {                        Debug.output("BinaryFile: " + name                                + " couldn't be accessed.");                        throw new IOException("AccessControlException trying to fetch "                                + name + " as a URL");                    }                }            }            if (inputReader == null) {                throw new FileNotFoundException("BinaryFile can't find: "                        + name);            }            classCount++;            openCount++;        } catch (IOException ioe) {            throw ioe;        }    }    /**     * Takes a name of a file, and checks to see if it reflects an     * entry in a jar file. (Check the filename and see if it looks     * like "jarfile!jarfileentry".) If it is, it separates the path,     * and set the inputReader to a JarInputReader and returns true.     * If not, it returns false.     */    protected boolean setJarInputReader(String name) throws IOException {        try {            int index = name.indexOf("!");            if (index != -1) {                // Used to be this, modified by Erik Sanders to work                // with jdk 1.4 plugin                // String jarFileName =                // name.substring(name.indexOf(":") + 1, index);                // changed to this...                String jarFileName;                if (name.startsWith("file:")) {                    // java-plugin 1.3 returns local file: strip file:                    // from string                    jarFileName = name.substring(name.indexOf(":") + 1, index);                } else {                    // java-plugin 1.4 returns reference to server, so                    // leave http:// part                    // Used to start the substring from 1, but changed                    // to 0 thanks to DGK                    jarFileName = name.substring(0, index);                }                // skip !/ "                String jarEntryName = name.substring(index + 2);                if (Debug.debugging("binaryfile")) {                    Debug.output(" got: \n" + jarFileName + "\n" + jarEntryName);                }                // If the jar doesn't exist, should return something                // that indicates this. Should check the performance                // impllications of this call, though, at some point.                // DGK added                File f = new File(jarFileName);                 if (f.exists() == false) {                    return false;                 }                                setInputReader(new JarInputReader(jarFileName, jarEntryName));                return true;            }        } catch (java.security.AccessControlException ace) {            if (Debug.debugging("binaryfile")) {                Debug.output("BinaryFile.setJarInputFile: AccessControlException for "                        + name);            }        }        return false;    }    /**     * A simple test method to determine if a file or directory,     * represented by a string, can be found by the current Java     * environment. Uses the same tests as BinaryFile constructor for     * tracking down a file.     *      * @param name A path to a file, a URL, or a path to a jar file     *        entry.     */    public static boolean exists(String name) {        boolean exists = false;        try {            File file = null;            URL url = null;            if (!Environment.isApplet()) {                file = new File(name);            }            if (file != null && file.exists()) {                exists = true;            } else {                // url = ClassLoader.getSystemResource(name);                url = Thread.currentThread()                        .getContextClassLoader()                        .getResource(name);                // OK, now we want to look around for the file, in the                // classpaths, and as a resource. It may be a file in                // a classpath, available for direct access.                if (url != null) {                    exists = true;                } else if (Environment.isApplet()) {                    if (Debug.debugging("binaryfile")) {                        Debug.output(" As applet, checking codebase...");                    }                    // Look in the codebase for applets...                    URL[] cba = new URL[1];                    cba[0] = Environment.getApplet().getCodeBase();                    URLClassLoader ucl = URLClassLoader.newInstance(cba);                    if (ucl.getResource(name) != null) {                        exists = true;                        // This has been commented out because the                        // AppletDataNugget has been deprecated, and                        // is not needed.                        // } else {                        // url = AppletDataNugget.findResource(name);                        // if (url != null) {                        // exists = true;                        // }                    }                }                // It's not in the classpath, so try it as a URL to a                // webserver.                if (!exists && name.indexOf("http:") != -1) {                    try {                        InputStream stream = new URL(name).openStream();                        stream.close();                        exists = true;                    } catch (java.security.AccessControlException ace) {                        exists = false;                    }                }            }        } catch (IOException ioe) {            Debug.message("binaryfile",                    "BinaryFile.exists() caught IOException");            exists = false;        }        if (Debug.debugging("binaryfile")) {            Debug.output("BinaryFile.exists(" + name + ") = " + exists);        }        return exists;    }    /**     * Get the source name from the input reader.     */    public String getName() {        if (inputReader != null) {            return inputReader.getName();        }        return null;    }    /**     * Get the inputReader used for accessing the file, for quering     * purposes. Don't use it to get data, or the file pointers may     * get messed up.     */    public InputReader getInputReader() {        return inputReader;    }    /**     * Set the input reader used by the BinaryFile. Make sure it's     * intialized properly.     */    public void setInputReader(InputReader reader) {        if (Debug.debugging("binaryfile")) {            Debug.output("Setting inputReader");        }        inputReader = reader;    }    /**

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本在线不卡视频| 污片在线观看一区二区| 国产一区二区三区电影在线观看 | 国产精品日日摸夜夜摸av| 国产精品2024| 国产精品女同互慰在线看| 成人av网站在线| 亚洲精品国产精华液| 91精选在线观看| 久国产精品韩国三级视频| 欧美激情一区三区| 在线这里只有精品| 另类综合日韩欧美亚洲| 国产女主播在线一区二区| 色88888久久久久久影院按摩| 性做久久久久久免费观看欧美| 日韩你懂的电影在线观看| 成人蜜臀av电影| 亚洲国产视频在线| 久久久一区二区| 色嗨嗨av一区二区三区| 欧美aaa在线| 中文字幕成人网| 777午夜精品免费视频| 国产精品亚洲人在线观看| 亚洲视频一区二区在线观看| 在线不卡一区二区| 风间由美一区二区av101 | 色综合天天综合在线视频| 肉丝袜脚交视频一区二区| 久久亚洲精品小早川怜子| 色哟哟一区二区在线观看| 久久99国产精品久久| 亚洲欧美视频在线观看视频| 日韩一区二区免费在线电影| 94-欧美-setu| 久久99精品久久久久久动态图| 亚洲伦理在线免费看| 久久久激情视频| 欧美丰满高潮xxxx喷水动漫| 粉嫩一区二区三区在线看| 亚洲国产精品久久久男人的天堂 | 亚洲午夜久久久久久久久电影网| 精品精品国产高清一毛片一天堂| 91麻豆swag| 国产成人综合网站| 日本成人在线电影网| 亚洲一线二线三线视频| 亚洲国产岛国毛片在线| 日韩精品一区二区三区蜜臀| 在线观看欧美黄色| 99久久777色| 国产精品系列在线观看| 亚洲一区在线播放| 国产精品久久久久久久午夜片| 26uuu亚洲综合色欧美| 欧美一区二区三区成人| 欧美亚男人的天堂| 97se狠狠狠综合亚洲狠狠| 国产精品白丝jk白祙喷水网站| 日韩精品三区四区| 亚洲第一电影网| 亚洲综合免费观看高清在线观看| 中文字幕中文字幕一区二区| 国产精品五月天| 欧美激情一二三区| 欧美韩国日本一区| 久久精品欧美日韩精品| 久久久久久久久久久久电影| 欧美成va人片在线观看| 日韩一区二区精品葵司在线| 日韩一卡二卡三卡四卡| 日韩欧美一级特黄在线播放| 日韩欧美的一区| 精品日韩成人av| 欧美精品一区二区三区视频| 精品动漫一区二区三区在线观看| 精品国产99国产精品| 精品欧美乱码久久久久久 | 中文字幕制服丝袜成人av | 精品久久久久久无| 亚洲精品一区二区三区福利| 久久久五月婷婷| 国产精品色婷婷| 亚洲欧美一区二区三区孕妇| 亚洲自拍偷拍麻豆| 调教+趴+乳夹+国产+精品| 日韩电影一区二区三区四区| 久久国产麻豆精品| 国产精品12区| 91免费视频大全| 欧美日韩国产免费| 日韩精品一区二区三区在线| 欧美tickle裸体挠脚心vk| 国产欧美一区二区精品性色 | 中文一区一区三区高中清不卡| 国产女主播视频一区二区| 亚洲欧洲一区二区在线播放| 亚洲精品国产a久久久久久| 亚洲国产成人porn| 国内精品国产成人| 懂色一区二区三区免费观看 | 成人午夜激情视频| 在线精品视频免费播放| 日韩欧美精品在线| 国产精品国产三级国产| 午夜在线电影亚洲一区| 韩国在线一区二区| 一本久道久久综合中文字幕 | 久久综合网色—综合色88| 国产精品免费久久久久| 无吗不卡中文字幕| 国产精品亚洲视频| 欧美三级蜜桃2在线观看| 久久婷婷色综合| 一区二区三区产品免费精品久久75| 亚洲第一二三四区| 成人综合婷婷国产精品久久蜜臀 | 国产在线播放一区三区四| 91在线视频观看| 精品国产网站在线观看| 亚洲欧美日本韩国| 国产一区二区三区蝌蚪| 欧美三级乱人伦电影| 国产精品久久久久影院色老大| 奇米777欧美一区二区| 99精品国产99久久久久久白柏| 欧美一级高清片| 亚洲在线视频网站| 国产成人午夜精品影院观看视频 | 欧美日韩国产天堂| 国产精品无遮挡| 老汉av免费一区二区三区 | av在线不卡观看免费观看| 777久久久精品| 亚洲精品乱码久久久久久| 国产精品一品二品| 日韩免费观看高清完整版在线观看| 亚洲欧美另类小说视频| 国产成人在线视频网站| 欧美成人一区二区三区在线观看| 一区二区在线看| 99久久精品久久久久久清纯| 久久亚洲一区二区三区四区| 免费一区二区视频| 欧美日本一区二区三区四区 | 丝袜美腿亚洲色图| 色综合色狠狠天天综合色| 久久精品夜夜夜夜久久| 另类的小说在线视频另类成人小视频在线| 日本电影亚洲天堂一区| 亚洲私人黄色宅男| 99精品视频中文字幕| 国产日韩欧美高清| 国产白丝精品91爽爽久久| 久久免费国产精品| 久久成人免费电影| 精品理论电影在线观看| 久久精品国产99国产| 日韩一区二区在线观看视频| 青青草97国产精品免费观看 | 国产一区二区影院| 欧美成人r级一区二区三区| 男女男精品视频网| 欧美一级久久久久久久大片| 日本女人一区二区三区| 欧美一区二区三区在线视频| 婷婷丁香激情综合| 日韩一区二区免费在线观看| 精品在线播放免费| 精品福利一区二区三区免费视频| 韩国av一区二区| 中国色在线观看另类| 91精品欧美一区二区三区综合在| 亚洲综合在线电影| 欧美亚洲综合网| 日韩 欧美一区二区三区| 91精品福利在线一区二区三区| 日韩电影免费一区| 久久综合九色欧美综合狠狠| 国产精品一二三区| 综合中文字幕亚洲| 欧美亚洲动漫另类| 毛片基地黄久久久久久天堂| 2021国产精品久久精品| 99久久久精品免费观看国产蜜| 一区二区三区美女视频| 欧美精品一卡二卡| 国产激情一区二区三区| 亚洲精品免费在线播放| 9191成人精品久久| 国产精品69毛片高清亚洲| 中文字幕一区在线观看| 欧美日韩日日骚| 激情av综合网| 一区二区免费在线| 精品福利一区二区三区免费视频| 不卡的电影网站| 日韩在线一区二区| 欧美国产亚洲另类动漫|