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

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

?? fileinputreader.java

?? openmap java寫的開源數字地圖程序. 用applet實現,可以像google map 那樣放大縮小地圖.
?? JAVA
字號:
// **********************************************************************// // <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/FileInputReader.java,v $// $RCSfile: FileInputReader.java,v $// $Revision: 1.2.2.1 $// $Date: 2004/10/14 18:27:01 $// $Author: dietrick $// // **********************************************************************package com.bbn.openmap.io;import com.bbn.openmap.util.Debug;import java.io.*;/** * This class wraps a java.io.RandomAccessFile to allow us to choose * the byte-order of the underlying file.  It has a user-settable * byte-ordering, which is then used to properly implement the various * multibyte reading members.  Used for reading local files. * * @see java.io.RandomAccessFile  * @see com.bbn.openmap.io.InputReader  * @see com.bbn.openmap.io.BinaryFile */public class FileInputReader implements InputReader {    /** The underlying file input */    protected RandomAccessFile inputFile = null;    protected String name = null;    /**     * 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 FileInputReader(File f) throws IOException {        if (Debug.debugging("binaryfile")) {            Debug.output("FileInputReader created from " + f.getAbsolutePath());        }        init(f);    }    /**     * 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 path to the file to be opened for reading.     * @exception IOException pass-through errors from opening a     * RandomAccessFile with f     * @see java.io.RandomAccessFile      */    public FileInputReader(String f) throws IOException {        if (Debug.debugging("binaryfile")) {            Debug.output("FileInputReader created from " + f);        }        init(new File(f));    }    /**     * Get the file name.     */    public String getName() {        return name;    }    /**     * Initialize the underlying RandomAccessFile.  If it's found, but     * there are too many files open, it calls     * BinaryFile.closeClosable to try to get an open file pointer     * from the system, and then tries again.     * @param f a java.io.File     * @throws IOException     */    protected void init(File f) throws IOException {        try {            name = f.getName();            inputFile = new RandomAccessFile(f, "r");        } catch (IOException i) {            if (i instanceof FileNotFoundException) {                throw i;            }                        if (f.canRead()) {                BinaryFile.closeClosable();                inputFile = new RandomAccessFile(f, "r");            } else {                throw i;            }        }           }    /**     * Get the RandomAccessFile, for quering purposes only.  Don't use     * it to get data!     */    public RandomAccessFile getInputFile() {        return inputFile;    }    /**     * Skip over n bytes in the input file     *     * @param n the number of bytes to skip     * @return the actual number of bytes skipped.  annoying, isn't it?     * @exception IOException Any IO errors that occur in skipping bytes     * in the underlying file     */    public long skipBytes(long n) throws IOException {        return inputFile.skipBytes((int)n);    }    /**     * Get the index of the next character to be read     *     * @return the index     * @exception IOException Any IO errors that occur in accessing     * the underlying file     */    public long getFilePointer() throws IOException {        return inputFile.getFilePointer();    }    /**     * Set the index of the next character to be read.     *     * @param pos the position to seek to.     * @exception IOException Any IO Errors that occur in seeking the     * underlying file.     */    public void seek(long pos) throws IOException {        inputFile.seek(pos);    }    /**     * Local files only.  Retrieve the length of the file being accessed.     *     * @return the length of the file (counted in bytes)     * @exception IOException Any IO errors that occur in accessing the     * underlying file.     */    public long length() throws IOException {        return inputFile.length();    }    /**     * Return how many bytes left to be read in the file.     *     * @return the number of bytes remaining to be read (counted in bytes)     * @exception IOException Any IO errors encountered in accessing the file     */    public long available() throws IOException {        return(length() - getFilePointer());    }    /**      * Closes the underlying file     *     * @exception IOException Any IO errors encountered in accessing the file     */    public void close() throws IOException {        if (Debug.debugging("binaryfile")) {            Debug.output("FileInputReader.close()");        }        try {            if (inputFile != null) inputFile.close();        } catch (Exception e) {            e.printStackTrace();        }        inputFile = null;    }    /**     * Read from the file.     *     * @return one byte from the file.  -1 for EOF     * @exception IOException Any IO errors encountered in reading from the file     */    public int read() throws IOException {        return inputFile.read();    }    /**     * Read from the file     *     * @param b The byte array to read into     * @param off the first array position to read into     * @param len the number of bytes to read     * @return the number of bytes read     * @exception IOException Any IO errors encountered in reading from the file     */    public int read(byte b[], int off, int len) throws IOException {        return inputFile.read(b, off, len);    }    /**      * Read from the file.     *     * @param b the byte array to read into.  Equivelent to      * <code>read(b, 0, b.length)</code>     * @return the number of bytes read     * @exception IOException Any IO errors encountered in reading from the file     * @see java.io.RandomAccessFile#read(byte[])     */    public int read(byte b[]) throws IOException {        return inputFile.read(b);    }    /**      * Read from the file.     *     * @param howmany the number of bytes to read     * @param allowless if we can return fewer bytes than requested     * @return the array of bytes read.     * @exception FormatException Any IO Exceptions, plus an end-of-file     * encountered after reading some, but now enough, bytes when allowless     * was <code>false</code>     * @exception EOFException Encountered an end-of-file while allowless      * was <code>false</code>, but NO bytes had been read.     */    public byte[] readBytes(int howmany, boolean allowless)         throws EOFException, FormatException {        byte foo[] = new byte[howmany];        int gotsofar = 0;        int err = 0;        try {            while (gotsofar < howmany) {                err = inputFile.read(foo, gotsofar, howmany - gotsofar);                if (err == -1) {                    if (allowless) {                        //return a smaller array, so the caller can tell how much                        //they really got                        byte retval[] = new byte[gotsofar];                        System.arraycopy(foo, 0, retval, 0, gotsofar);                        return retval;                    } else { //some kind of failure...                        if (gotsofar > 0) {                            throw new FormatException("EOF while reading data");                        } else {                            throw new EOFException();                        }                    }                }                gotsofar += err;            }        } catch (IOException i) {            throw new FormatException("FileInputReader: readBytes IOException: " + i.getMessage());        }        return foo;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产视频一区在线播放| 久久人人超碰精品| 成人av网在线| 国产一区二区三区久久久| 午夜a成v人精品| 亚洲一区在线观看网站| 一区二区高清免费观看影视大全| 中文字幕在线不卡国产视频| 自拍av一区二区三区| 亚洲精选一二三| 一区二区三区在线观看欧美| 亚洲一二三四在线| 亚洲成a人在线观看| 五月天中文字幕一区二区| 亚洲成av人片一区二区| 日韩黄色免费网站| 激情综合亚洲精品| 国产精品 欧美精品| 99精品在线免费| 欧美日韩综合色| 欧美一区二区三区在线视频| 精品国产制服丝袜高跟| 国产欧美日韩久久| 一区二区三区欧美在线观看| 五月综合激情网| 国产一区二三区好的| 丁香一区二区三区| 欧洲亚洲国产日韩| 日韩三级在线观看| 国产精品丝袜久久久久久app| 亚洲美女视频在线| 蜜臀av一区二区在线观看| 国产成人免费视频| 欧美专区在线观看一区| 欧美一级欧美三级| 国产精品久久久久国产精品日日| 一区二区三区欧美| 狠狠色综合播放一区二区| 成人app软件下载大全免费| 欧美性大战久久久久久久| 欧美精品一区二区精品网| 亚洲美女一区二区三区| 国产一区二区美女诱惑| 欧美中文字幕久久| 中文字幕精品一区| 日韩一区精品视频| 99久久777色| 亚洲精品一区二区三区在线观看 | 国产调教视频一区| 亚洲乱码国产乱码精品精小说 | 69p69国产精品| 日本一区二区成人| 久久国产精品无码网站| 欧亚洲嫩模精品一区三区| 国产嫩草影院久久久久| 免费观看在线色综合| 色综合久久88色综合天天| 亚洲国产精品精华液2区45| 免费高清在线一区| 欧美亚洲日本国产| 亚洲人成网站在线| 成人中文字幕在线| 久久久99免费| 国内一区二区视频| 精品久久久久久综合日本欧美 | 美女诱惑一区二区| 欧美性大战久久| 亚洲一区影音先锋| 色婷婷久久久综合中文字幕| 综合婷婷亚洲小说| 99精品久久只有精品| 中文字幕乱码亚洲精品一区| 国产成人综合亚洲91猫咪| 久久影院午夜论| 激情综合网天天干| 亚洲精品在线网站| 国产一区二区三区免费看 | eeuss鲁片一区二区三区| 久久无码av三级| 久久精品免费观看| 精品国产免费久久| 韩国一区二区视频| 欧美国产精品一区| 99亚偷拍自图区亚洲| 亚洲美女视频一区| 欧美精品亚洲一区二区在线播放| 亚洲成a天堂v人片| 欧美一区二区免费视频| 免费成人在线观看视频| 久久精品一区二区三区不卡| 国产成人av资源| 日韩美女视频一区| 欧美日韩成人综合| 久久99国产精品免费网站| 久久久国际精品| 一本大道久久a久久精品综合| 亚洲国产电影在线观看| 色婷婷综合视频在线观看| 国产大陆亚洲精品国产| 亚洲高清一区二区三区| 国产精品不卡在线| 色菇凉天天综合网| 日韩电影免费一区| 精品成a人在线观看| 韩国女主播成人在线| 欧美韩国日本综合| 欧美日韩国产一二三| 国产一区在线观看视频| 综合分类小说区另类春色亚洲小说欧美| 激情深爱一区二区| 日本高清免费不卡视频| 欧美一级在线视频| 伊人开心综合网| 精品日韩一区二区| 色综合一个色综合亚洲| 日本亚洲视频在线| 国产精品久久看| 欧美一区三区四区| 国产精品99久久久久久久vr| 夜夜嗨av一区二区三区四季av| 在线一区二区视频| 国产很黄免费观看久久| 日韩vs国产vs欧美| 日本高清无吗v一区| 国内外成人在线视频| 亚洲精品高清在线观看| 精品久久一二三区| 欧美三级日韩三级国产三级| 国产91丝袜在线观看| 青娱乐精品视频| 一区二区三区在线影院| 中文字幕成人网| 精品日韩av一区二区| 欧美色视频一区| 色婷婷久久久久swag精品 | 成人在线视频一区| 美女网站色91| 亚洲第一在线综合网站| √…a在线天堂一区| 精品一区二区久久| 免费在线观看日韩欧美| 久久99精品国产麻豆婷婷洗澡| 91精品国产欧美一区二区18| 在线亚洲人成电影网站色www| 国产成人无遮挡在线视频| 蜜臀久久久久久久| 婷婷中文字幕一区三区| 亚洲国产乱码最新视频| 一区二区三区精品| 亚洲在线视频网站| 亚洲一区二区三区中文字幕| 亚洲欧美综合色| 中文字幕在线观看一区二区| 国产精品情趣视频| 国产精品人成在线观看免费| 中文字幕欧美激情| 国产精品私人影院| 亚洲欧洲日产国产综合网| 最新国产精品久久精品| 中文字幕亚洲综合久久菠萝蜜| 国产精品久久久久久久久晋中 | 中文字幕va一区二区三区| 国产亚洲成年网址在线观看| 久久久亚洲欧洲日产国码αv| 久久综合给合久久狠狠狠97色69| 久久久久9999亚洲精品| 日本一区二区成人在线| 亚洲色图第一区| 亚洲一区在线观看网站| 视频在线在亚洲| 精品在线亚洲视频| 国产成人精品亚洲日本在线桃色 | 日韩专区一卡二卡| 免费在线观看日韩欧美| 国产乱子伦一区二区三区国色天香| 国产精品综合一区二区三区| 成人午夜私人影院| 欧美在线观看视频一区二区| 欧美电影在线免费观看| 2020国产精品久久精品美国| 欧美激情在线看| 亚洲一区二区三区自拍| 久久超碰97人人做人人爱| 成人一区在线看| 欧美酷刑日本凌虐凌虐| 久久综合久久鬼色| 亚洲黄色小说网站| 久草精品在线观看| 成人av集中营| 日韩一区二区三免费高清| 亚洲欧洲国产日本综合| 首页国产丝袜综合| 99在线视频精品| 欧美一级欧美三级在线观看| 亚洲图片欧美激情| 蜜桃视频一区二区| 色综合一区二区三区| 久久久亚洲综合| 视频一区视频二区中文字幕| av爱爱亚洲一区|