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

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

?? fileformatreader.java

?? jpeg2000算法實現
?? JAVA
字號:
/* * cvs identifier: * * $Id: FileFormatReader.java,v 1.14 2001/02/16 14:55:46 qtxjoas Exp $ *  * Class:                   FileFormatReader * * Description:             Reads the file format * * * * COPYRIGHT: *  * This software module was originally developed by Rapha雔 Grosbois and * Diego Santa Cruz (Swiss Federal Institute of Technology-EPFL); Joel * Askel鰂 (Ericsson Radio Systems AB); and Bertrand Berthelot, David * Bouchard, F閘ix Henry, Gerard Mozelle and Patrice Onno (Canon Research * Centre France S.A) in the course of development of the JPEG2000 * standard as specified by ISO/IEC 15444 (JPEG 2000 Standard). This * software module is an implementation of a part of the JPEG 2000 * Standard. Swiss Federal Institute of Technology-EPFL, Ericsson Radio * Systems AB and Canon Research Centre France S.A (collectively JJ2000 * Partners) agree not to assert against ISO/IEC and users of the JPEG * 2000 Standard (Users) any of their rights under the copyright, not * including other intellectual property rights, for this software module * with respect to the usage by ISO/IEC and Users of this software module * or modifications thereof for use in hardware or software products * claiming conformance to the JPEG 2000 Standard. Those intending to use * this software module in hardware or software products are advised that * their use may infringe existing patents. The original developers of * this software module, JJ2000 Partners and ISO/IEC assume no liability * for use of this software module or modifications thereof. No license * or right to this software module is granted for non JPEG 2000 Standard * conforming products. JJ2000 Partners have full right to use this * software module for his/her own purpose, assign or donate this * software module to any third party and to inhibit third parties from * using this software module for non JPEG 2000 Standard conforming * products. This copyright notice must be included in all copies or * derivative works of this software module. *  * Copyright (c) 1999/2000 JJ2000 Partners. * */package jj2000.j2k.fileformat.reader;import jj2000.j2k.codestream.*;import jj2000.j2k.fileformat.*;import jj2000.j2k.io.*;import java.util.*;import java.io.*;/** * This class reads the file format wrapper that may or may not exist around a * valid JPEG 2000 codestream. Since no information from the file format is * used in the actual decoding, this class simply goes through the file and * finds the first valid codestream. * * @see jj2000.j2k.fileformat.writer.FileFormatWriter * */public class FileFormatReader implements FileFormatBoxes{        /** The random access from which the file format boxes are read */    private RandomAccessIO in;    /** The positions of the codestreams in the fileformat*/    private Vector codeStreamPos;     /** The lengths of the codestreams in the fileformat*/    private Vector codeStreamLength;     /** Flag indicating whether or not the JP2 file format is used */    public boolean JP2FFUsed;    /**      * The constructor of the FileFormatReader     *     * @param in The RandomAccessIO from which to read the file format     * */    public FileFormatReader(RandomAccessIO in){        this.in = in;    }    /**      * This method checks whether the given RandomAccessIO is a valid JP2 file     * and if so finds the first codestream in the file. Currently, the     * information in the codestream is not used     *     * @param in The RandomAccessIO from which to read the file format     *     * @exception java.io.IOException If an I/O error ocurred.     *     * @exception java.io.EOFException If end of file is reached     * */    public void readFileFormat() throws IOException, EOFException {        int foundCodeStreamBoxes=0;        int box;        int length;        long longLength=0;        int pos;        short marker;        boolean jp2HeaderBoxFound=false;        boolean lastBoxFound = false;        try{            // Go through the randomaccessio and find the first            // contiguous codestream box. Check also that the File Format is            // correct                        // Make sure that the first 12 bytes is the JP2_SIGNATURE_BOX            // or if not that the first 2 bytes is the SOC marker            if(in.readInt() != 0x0000000c ||               in.readInt() != JP2_SIGNATURE_BOX ||               in.readInt() != 0x0d0a870a){ // Not a JP2 file                in.seek(0);                                marker = (short)in.readShort();                if(marker != Markers.SOC) //Standard syntax marker found                    throw new Error("File is neither valid JP2 file nor "+                                    "valid JPEG 2000 codestream");                JP2FFUsed = false;                in.seek(0);                return;            }            // The JP2 File format is being used            JP2FFUsed = true;                        // Read File Type box            if(!readFileTypeBox()){                // Not a valid JP2 file or codestream                throw new Error("Invalid JP2 file: File Type box missing");            }                                                          // Read all remaining boxes             while(!lastBoxFound){                pos = in.getPos();                length = in.readInt();                if((pos+length) == in.length())                    lastBoxFound = true;                box = in.readInt();                if(length == 0){                    lastBoxFound = true;                    length = in.length()-in.getPos();                }                else if(length == 1) {                    longLength = in.readLong();                    throw new IOException("File too long.");                }                else longLength = (long) 0;                switch(box){                case CONTIGUOUS_CODESTREAM_BOX:                    if(!jp2HeaderBoxFound)                        throw new Error("Invalid JP2 file: JP2Header box not "+                                        "found before Contiguous codestream "+                                        "box ");                    readContiguousCodeStreamBox(pos, length, longLength);                    break;                case JP2_HEADER_BOX:                    if(jp2HeaderBoxFound)                        throw new Error("Invalid JP2 file: Multiple "+                                        "JP2Header boxes found");                    readJP2HeaderBox(pos, length, longLength);                    jp2HeaderBoxFound = true;                    break;                case INTELLECTUAL_PROPERTY_BOX:                    readIntPropertyBox(length);                    break;                case XML_BOX:                    readXMLBox(length);                    break;                case UUID_BOX:                    readUUIDBox(length);                    break;                case UUID_INFO_BOX:                    readUUIDInfoBox(length);                    break;                default:                  System.out.println("Unknown box-type: "+box);                }                if(!lastBoxFound)                    in.seek(pos+length);            }        }catch( EOFException e ){            throw new Error("EOF reached before finding Contiguous "+                            "Codestream Box");        }        if(codeStreamPos.size() == 0){          // Not a valid JP2 file or codestream          throw new Error("Invalid JP2 file: Contiguous codestream box "+                          "missing");        }                return;            }    /**      * This method reads the File Type box     *     * @return false if the File Type box was not found or invalid else true     *     * @exception java.io.IOException If an I/O error ocurred.     *     * @exception java.io.EOFException If the end of file was reached     * */    public boolean readFileTypeBox()throws IOException, EOFException {        int length;        long longLength=0;        int pos;        int nComp;        boolean foundComp=false;        // Get current position in file        pos = in.getPos();                // Read box length (LBox)        length = in.readInt();        if(length == 0) // This can not be last box            throw new Error("Zero-length of Profile Box");        // Check that this is a File Type box (TBox)        if(in.readInt() != FILE_TYPE_BOX)            return false;        // Check for XLBox        if(length == 1) { // Box has 8 byte length;            longLength = in.readLong();            throw new IOException("File too long.");        }        // Check that this is a correct DBox value        // Read Brand field        if(in.readInt() != FT_BR)            return false;        // Read MinV field        in.readInt();        // Check that there is at least one FT_BR entry in in        // compatibility list        nComp = (length - 16)/4; // Number of compatibilities.        for(int i=nComp; i>0; i--){            if(in.readInt() == FT_BR)                foundComp = true;        }        if(!foundComp)            return false;        return true;    }    /**      * This method reads the JP2Header box     *     * @param pos The position in the file     *     * @param length The length of the JP2Header box     *     * @param long length The length of the JP2Header box if greater than     * 1<<32     *     * @return false if the JP2Header box was not found or invalid else true     *     * @exception java.io.IOException If an I/O error ocurred.     *     * @exception java.io.EOFException If the end of file was reached     * */    public boolean readJP2HeaderBox(long pos, int length, long longLength)        throws IOException, EOFException {        if(length == 0) // This can not be last box            throw new Error("Zero-length of JP2Header Box");        // Here the JP2Header data (DBox) would be read if we were to use it                return true;    }    /**      * This method skips the Contiguous codestream box and adds position     * of contiguous codestream to a vector     *     * @param pos The position in the file     *     * @param length The length of the JP2Header box     *     * @param long length The length of the JP2Header box if greater than 1<<32     *     * @return false if the Contiguous codestream box was not found or invalid     * else true     *     * @exception java.io.IOException If an I/O error ocurred.     *     * @exception java.io.EOFException If the end of file was reached     * */    public boolean readContiguousCodeStreamBox(long pos, int length,                                                long longLength)        throws IOException, EOFException {                // Add new codestream position to position vector        int ccpos = in.getPos();        if(codeStreamPos == null)            codeStreamPos = new Vector();                   codeStreamPos.addElement(new Integer(ccpos));        // Add new codestream length to length vector        if(codeStreamLength == null)            codeStreamLength = new Vector();        codeStreamLength.addElement(new Integer(length));        return true;    }    /**      * This method reads the contents of the Intellectual property box     * */    public void readIntPropertyBox(int length){    }    /**      * This method reads the contents of the XML box     * */    public void readXMLBox(int length){    }    /**      * This method reads the contents of the Intellectual property box     * */    public void readUUIDBox(int length){    }    /**      * This method reads the contents of the Intellectual property box     * */    public void readUUIDInfoBox(int length){    }    /**      * This method creates and returns an array of positions to contiguous     * codestreams in the file     *     * @return The positions of the contiguous codestreams in the file     * */    public long[] getCodeStreamPos(){        int size = codeStreamPos.size();        long[] pos = new long[size];        for(int i=0 ; i<size ; i++)            pos[i]=((Integer)(codeStreamPos.elementAt(i))).longValue();        return pos;    }                /**      * This method returns the position of the first contiguous codestreams in     * the file     *     * @return The position of the first contiguous codestream in the file     * */    public int getFirstCodeStreamPos(){        return ((Integer)(codeStreamPos.elementAt(0))).intValue();    }                /**      * This method returns the length of the first contiguous codestreams in     * the file     *     * @return The length of the first contiguous codestream in the file     * */    public int getFirstCodeStreamLength(){        return ((Integer)(codeStreamLength.elementAt(0))).intValue();    }            }                                                               

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产麻豆精品视频| 在线观看一区二区视频| 91免费版pro下载短视频| 欧美一区二区三区不卡| 日韩一区在线看| 久久99精品久久只有精品| 91久久精品日日躁夜夜躁欧美| 日韩久久久精品| 亚洲激情图片一区| 99视频精品全部免费在线| 久久亚洲一区二区三区四区| 水野朝阳av一区二区三区| 91久久精品日日躁夜夜躁欧美| 26uuu亚洲婷婷狠狠天堂| 日韩电影在线免费观看| 日本精品一区二区三区高清 | 91精品婷婷国产综合久久| 亚洲乱码中文字幕| 99久久婷婷国产综合精品 | 亚洲国产精品激情在线观看| 人妖欧美一区二区| 欧美日韩aaa| 亚洲大片在线观看| 在线观看91视频| 亚洲日本一区二区| 99精品视频一区| 日韩一区欧美一区| 91麻豆文化传媒在线观看| 国产精品久久久久久久久果冻传媒 | av亚洲精华国产精华精华| 久久老女人爱爱| 国产精品白丝jk黑袜喷水| 精品国产污网站| 精品一区二区成人精品| 久久久久久久综合色一本| 国产激情一区二区三区四区| 日韩欧美国产系列| 精品制服美女丁香| 欧美精品一区二区三区高清aⅴ| 另类小说一区二区三区| 久久―日本道色综合久久| 国产主播一区二区| 久久久国产一区二区三区四区小说| 国产乱一区二区| 亚洲欧洲精品一区二区三区| 色网综合在线观看| 五月天欧美精品| 久久亚洲精精品中文字幕早川悠里 | 国产欧美日韩综合精品一区二区| 国产精品99久久久久久宅男| 亚洲欧洲一区二区三区| 91啪九色porn原创视频在线观看| 亚洲精品乱码久久久久久日本蜜臀| 日本韩国欧美国产| 久久精品国产亚洲一区二区三区| 国产日韩欧美不卡| 欧美三级日韩在线| 国产伦精品一区二区三区免费 | 精品美女被调教视频大全网站| 国产一区二区美女诱惑| 综合欧美一区二区三区| 欧美精品久久久久久久多人混战 | 日本人妖一区二区| 国产精品视频免费| 91麻豆精品国产91久久久久久| 精品一区二区三区在线播放视频| 中文子幕无线码一区tr| 欧美色综合影院| 麻豆91精品视频| 亚洲精品成人悠悠色影视| 日韩一二三区视频| 成人成人成人在线视频| 天天免费综合色| 国产精品久久久一区麻豆最新章节| 欧美日韩一区二区三区在线| 国产一区二区电影| 亚洲va韩国va欧美va精品| 国产色婷婷亚洲99精品小说| 欧美亚洲高清一区二区三区不卡| 狠狠色综合日日| 午夜一区二区三区在线观看| 日本一区二区三区四区 | 中文字幕精品一区二区三区精品| 欧美日韩色综合| 99久久er热在这里只有精品15| 看电影不卡的网站| 亚洲成av人片在线| 亚洲视频电影在线| 国产拍欧美日韩视频二区| 91精品久久久久久久久99蜜臂| 91伊人久久大香线蕉| 国产精品综合网| 久久99精品一区二区三区三区| 亚洲免费观看在线视频| 国产网站一区二区三区| 日韩一级片网址| 欧美日韩高清一区| 在线观看欧美日本| 色天使色偷偷av一区二区| 成人av免费观看| 国产91丝袜在线播放0| 国产乱子伦视频一区二区三区| 麻豆久久一区二区| 日产国产欧美视频一区精品| 亚洲一区二区五区| 一区二区三区免费看视频| 国产精品成人免费精品自在线观看| 精品久久久久久无| 欧美精品一区二区三| 久久婷婷一区二区三区| 精品国内片67194| 精品国产乱码久久久久久图片| 91精品久久久久久久99蜜桃| 51精品视频一区二区三区| 在线不卡中文字幕| 91精品国产欧美日韩| 日韩一区二区精品| 欧美变态tickle挠乳网站| 日韩亚洲电影在线| 欧美精品一区在线观看| 精品人伦一区二区色婷婷| 亚洲综合成人在线| 午夜精品久久久久久久久久久| 午夜一区二区三区视频| 蜜臀av一区二区| 国产精品中文有码| 成人av资源在线| 91久久精品一区二区三| 欧美日韩精品免费观看视频| 日韩一区二区三区四区| 久久久久久久久久久久久女国产乱| www国产成人| 亚洲欧美在线视频观看| 亚洲1区2区3区4区| 捆绑调教美女网站视频一区| 国产成人a级片| 99精品视频在线观看免费| 欧美色网一区二区| 2023国产精品视频| 亚洲日本va午夜在线电影| 亚洲午夜电影在线| 国精产品一区一区三区mba视频| 国产成人精品一区二区三区四区 | 亚洲乱码精品一二三四区日韩在线| 亚洲综合男人的天堂| 老司机免费视频一区二区| 成人性生交大片免费看中文网站| 91麻豆国产香蕉久久精品| 日韩一级高清毛片| 亚洲丝袜另类动漫二区| 天天综合色天天综合色h| 国产成人啪免费观看软件| 91福利社在线观看| 2021久久国产精品不只是精品| 亚洲同性同志一二三专区| 石原莉奈在线亚洲二区| 国产白丝精品91爽爽久久 | 99久久精品费精品国产一区二区| 欧美亚洲国产一区在线观看网站 | 欧美一区永久视频免费观看| 亚洲国产精品v| 日韩国产欧美在线视频| www.色精品| 精品99999| 丝袜a∨在线一区二区三区不卡| 成人一二三区视频| 欧美大片日本大片免费观看| 一区二区三区在线视频观看58| 狠狠网亚洲精品| 欧美肥胖老妇做爰| 一区二区三区在线免费观看| 国产精品1区2区| 日韩视频在线一区二区| 亚洲大片一区二区三区| 99久久精品免费| 国产午夜精品久久久久久免费视| 天使萌一区二区三区免费观看| 91视频.com| 国产精品日韩成人| 国产福利91精品一区| 欧美mv和日韩mv国产网站| 亚洲福利一区二区三区| 色噜噜夜夜夜综合网| 国产精品色在线| 东方aⅴ免费观看久久av| 亚洲精品一区在线观看| 蜜芽一区二区三区| 欧美一区二区三区爱爱| 亚洲国产一区二区三区| 在线一区二区三区四区五区| 自拍偷拍国产精品| 成人禁用看黄a在线| 欧美激情综合五月色丁香| 国产毛片一区二区| 久久亚洲春色中文字幕久久久| 久久电影网站中文字幕| 欧美电影免费观看高清完整版在线观看| 亚洲国产毛片aaaaa无费看| 精品视频免费在线| 午夜影院久久久|