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

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

?? gzipinputstream.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
//#condition MUJMAIL_COMPRESSED_CONNECTION/* * Created on Jun 25, 2007 at 11:12:23 AM. *  * Copyright (c) 2007 Robert Virkus / Enough Software * * This file is part of J2ME Polish. * * J2ME Polish is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. *  * J2ME Polish is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with J2ME Polish; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA *  * Commercial licenses are also available, please * refer to the accompanying LICENSE.txt or visit * http://www.j2mepolish.org for details. */package mujmail.connections.gzip;import java.io.IOException;import java.io.InputStream;/** * <p>Reads and uncompresses GZIP or DEFLATE encoded input streams.</p> * * <p>Copyright Enough Software 2007 - 2008</p> * <pre> * history *        Jun 25, 2007 - Simon creation * </pre> * @author Simon Schmitt, simon.schmitt@enough.de */public class GZipInputStream extends InputStream {	/**	 * This constant triggers the normal deflate compression as described in rfc 1951.	 */	public static final int TYPE_DEFLATE=0;	/**	 * This constant triggers the gzip compression that is the same as deflate with 	 * some extra header information (see rfc 1952).	 */	public static final int TYPE_GZIP=1;		private InputStream inStream;	private boolean inStreamEnded;		private byte status;	private static final byte EXPECTING_HEADER=0;	private static final byte EXPECTING_DATA=1;	private static final byte EXPECTING_CHECK=2;	private static final byte FINISHED=3;		private boolean hash;	/**	 * The data seems to be decompressed sucessfull if vaildData	 *  is true after processing the whole stream. This is determinded	 *  via counting the processed bytes and depending on the	 *  on the parameters given to the constructor also by using	 *  a CRC32 checksum.	 */	private boolean vaildData;		private int crc32;	private int[] crc32Table=new int[256];		private int type;		// Flags	private boolean BFINAL;//indicates last block	private int BTYPE;// type of compression		// Buffer stuff:	private byte[] window=new byte[32 * 1024]; // every decoder has to support windows up to 32k	private int pProcessed=0;				// data pointer = one after the last processed	private long allPocessed=0;				// amount of processed data mod 2^32		byte[] outBuff;			// the plain data will be stored here before being requested	private int buffsize;	int outEnd=0;						// the position AFTER the last byte of data	int lastEnd=0;						// 		"		the point up to the crc32 was computed	int outStart=0;						// the position of the first bit of data		private int B0len;				// length of remaining plain bytes to process		long[] smallCodeBuffer=new long[2];// (1) contains the merged bitcode and (2) contains the count of those bits	static final byte BL=8; 		// Compression stuff	short[] huffmanTree;		short[] distHuffTree;		/**	 * Creates an input stream capable of GZIP and Deflate with a buffer of 1024 bytes.	 * 	 * @param inputStream 	the stream that contains the compressed data.	 * @param compressionType	TYPE_GZIP or TYPE_DEFLATE	 * @param hash 		set true for data checking, set false for speed reading	 * @throws IOException when the header of a GZIP stream cannot be skipped	 * @see #TYPE_DEFLATE	 * @see #TYPE_GZIP	 */	public GZipInputStream(InputStream inputStream, int compressionType, boolean hash) 	throws IOException	{		this(inputStream, 1024, compressionType, hash);	}		/**	 * Creates an input stream capable of GZIP and Deflate.	 * 	 * @param inputStream 	the stream that contains the compressed data.	 * @param size the size of the internally used buffer	 * @param compressionType	TYPE_GZIP or TYPE_DEFLATE	 * @param hash 		set true for data checking, set false for speed reading	 * @throws IOException when the header of a GZIP stream cannot be skipped	 * @see #TYPE_DEFLATE	 * @see #TYPE_GZIP	 */	public GZipInputStream(InputStream inputStream, int size, int compressionType, boolean hash) 	throws IOException 	{		this.inStream=inputStream;				this.inStreamEnded=false;		this.status=GZipInputStream.EXPECTING_HEADER;				this.hash=hash;		this.type=compressionType;				this.smallCodeBuffer=new long[2];		this.huffmanTree=new short[288*4];						this.distHuffTree=new short[32*4];				this.buffsize=size;		this.outBuff=new byte[size+300];				if (this.type==GZipInputStream.TYPE_GZIP){			ZipHelper.skipheader(inputStream);		}				this.crc32=0;	}	    public void close() throws IOException{    	this.inStream.close();    	    	this.smallCodeBuffer=null;		this.huffmanTree=null;		this.distHuffTree=null;    }	    /**     * This function hides the fact that 'this.window' is a ring buffer     * 		so just pass 'start' and 'len' of data in the window as well     *  	as a destination and it will be copied there.     * @param start     * @param len     * @param dest     */    private void copyFromWindow(int start, int len, byte[] dest, int destoff){    	if (start + len < this.window.length) {    		System.arraycopy(this.window, start, dest, 0+destoff, len);    	} else {    		System.arraycopy(this.window, start, dest, 0+destoff, this.window.length - start);    		System.arraycopy(this.window, 0, dest, this.window.length - start + destoff, len - (this.window.length - start) );    		    	}    }    private void copyIntoWindow(int start, int len, byte[] src, int srcOff){    	if(len + start < this.window.length) {			System.arraycopy(src, srcOff, this.window, start, len);		} else {			System.arraycopy(src, srcOff, this.window, start, this.window.length-start);			System.arraycopy(src, srcOff+(this.window.length-start), this.window, 0, len - (this.window.length-start));		}    	    }            /**     * This function fills the internal outputbuffer reading data form the this.inputStream      *		and inflating it.     * Note: Alf inbuil have bud behavior for interactive protolocs ... try to fill output buffer as much as possible to decrease inflate call     *   Chnage needed to stop after e.g line end in do end of block     */    private void inflate() throws IOException{    	int val=0;    	    	int rep;    	int rem;    	    	int cLen;    	int cPos;    	int aPos;    	    	int copyBytes;    	    	byte[] myWindow=this.window;    	byte[] myOutBuff=this.outBuff;    	    	// shift outputbuffer to the beginning    	System.arraycopy(myOutBuff, this.outStart, myOutBuff, 0, this.outEnd-this.outStart);    	this.outEnd-=this.outStart;    	this.outStart=0;    	    	this.lastEnd = this.outEnd;    	        boolean refill = ( this.inStream.available() == 0); /// Flag whether refillSmallBuffer can call read (and so possibli block) if no data avilable        boolean continueDecodingLoop = true;         if (this.B0len==0){    		if (this.smallCodeBuffer[1]<15){    			refillSmallCodeBuffer( false);                        refill = false;    		}    	}    	    	    	// and fill it by parsing the input-stream    	while ( (myOutBuff.length-this.outEnd>300 && (this.smallCodeBuffer[1]>0  || this.B0len>0)) && this.status!=GZipInputStream.FINISHED){                // parse block header    		if (this.status == GZipInputStream.EXPECTING_HEADER){                    // Process header only if datas are available                    if ( continueDecodingLoop == false ) break;                         processHeader();    		}    		// deal with the data    		    		if (this.status==GZipInputStream.EXPECTING_DATA){	    		// just copy data	    		if (this.BTYPE==0){	    				    			if (this.B0len>0){		    			// copy directly	    				copyBytes=(myOutBuff.length-this.outEnd)>this.B0len ? this.B0len : myOutBuff.length-this.outEnd;	    						    			//at most myOutBuff.length-this.outEnd		    				    				copyBytes=this.inStream.read(myOutBuff, this.outEnd, copyBytes);		    			copyIntoWindow(this.pProcessed, copyBytes, myOutBuff, this.outEnd);		    					    			this.outEnd+=copyBytes;		    			this.pProcessed=(this.pProcessed +copyBytes) & 32767;// % (1<<15);		    					    			this.B0len-=copyBytes;	    			}else{		    			if(this.BFINAL){		    				this.status=GZipInputStream.EXPECTING_CHECK;		    			} else {		    				this.status=GZipInputStream.EXPECTING_HEADER;		    			}		    			if (this.smallCodeBuffer[1]<15){		    				continueDecodingLoop = refillSmallCodeBuffer( refill);                                                refill = false;		    			}	    			}	    				    		}// inflate	    		else {	    				    			if (this.smallCodeBuffer[1]<15){	    				refillSmallCodeBuffer( true); // Can block ... we need this data for decoding	    			}		    			    			val=ZipHelper.deHuffNext(this.smallCodeBuffer,this.huffmanTree);	    					    				    		// normal single byte		    		if (val<256){		    					    			//this.window[this.pProcessed]=(byte)val;		    			myWindow[this.pProcessed]=(byte)val;		    			this.pProcessed=(this.pProcessed +1) &  32767;// % (1<<15);		    					    			myOutBuff[this.outEnd]=(byte)val;		    			this.outEnd++;		    					    					    		}// copy: pointer + len 		    		else if (val!=256) {						if (val>285){							//ERROR: data > 285 was decoded. This is invalid data.;							throw new IOException("1");						}								    			// parse the pointer 								    			// cLen		    			// 		read some bits		    			cLen=popSmallBuffer(ZipHelper.LENGTH_CODE[(val-257)<<1]);		    			//		add the offset		    			cLen+=ZipHelper.LENGTH_CODE[((val-257)<<1)+1];		    					    			// cPos		    			//    	resolve the index		    			if (this.smallCodeBuffer[1]<15){		    				refillSmallCodeBuffer( true);		    			}		    			// DISTANCE		    			val=ZipHelper.deHuffNext(this.smallCodeBuffer, this.distHuffTree);		    					    			//	 	resolve the value		    			cPos=popSmallBuffer(ZipHelper.DISTANCE_CODE[val<<1]);								    			cPos+=ZipHelper.DISTANCE_CODE[(val<<1)+1];		    					    					    			// process the pointer (the data does always fit)		    					    			// the absolute starting position for copying data		    			aPos=this.pProcessed - cPos;		    			aPos+=aPos<0 ? myWindow.length:0;		    					    			// how often will the data be copied?		    			rep=cLen/cPos;		    			rem=cLen-cPos*rep;		    					    			for (int j = 0; j < rep; j++) {		    				// cPos < cLen		    				copyFromWindow(aPos, cPos, myOutBuff,this.outEnd);			    			copyIntoWindow(this.pProcessed, cPos, myOutBuff, this.outEnd);		    				this.outEnd+=cPos;		    				this.pProcessed=(this.pProcessed +cPos) &  32767;//% (1<<15);		    			}		    					    			// cPos > cLen OR remainder 		    			copyFromWindow(aPos, rem, myOutBuff,this.outEnd);// from window into buffer, and again into window		    			copyIntoWindow(this.pProcessed, rem, myOutBuff, this.outEnd);		    			this.outEnd+=rem;		    			this.pProcessed=(this.pProcessed +rem) &  32767;// % (1<<15);		    					    					    		}// val=256		    		else {		    			//System.out.println("Block End code=" + huffmanCode[256] + "  pP="+pProcessed + " popC: " + popcount[0]);		    			if(this.BFINAL){		    				this.status=GZipInputStream.EXPECTING_CHECK;		    			} else {		    				this.status=GZipInputStream.EXPECTING_HEADER;		    			}		    		}		    		if (this.smallCodeBuffer[1]<15){		    			continueDecodingLoop = refillSmallCodeBuffer( refill);		    		}		    	}	    	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成av人片在线观看| 日本韩国一区二区三区| 91丨九色丨蝌蚪富婆spa| 欧美久久久久免费| 亚洲视频综合在线| 久久99国产精品尤物| 色婷婷精品久久二区二区蜜臀av| 久久只精品国产| 日韩中文字幕麻豆| 91精品办公室少妇高潮对白| 国产精品视频免费| 国产一区二三区| 欧美一二三区精品| 亚洲成人一区二区| 在线免费不卡视频| 亚洲欧洲韩国日本视频 | 亚洲精品在线观看视频| 亚洲一线二线三线久久久| 国产在线麻豆精品观看| 欧美一区二区三区免费在线看| 一区二区三区四区视频精品免费 | 99国产精品99久久久久久| 精品欧美久久久| 免费观看成人av| 欧美一区二区福利视频| 午夜影院久久久| 欧美日韩国产精选| 午夜精品久久久久久| 欧美日韩一区二区欧美激情| 亚洲黄色av一区| 在线视频综合导航| 夜夜爽夜夜爽精品视频| 欧美在线视频全部完| 一区二区三区精品久久久| 色视频一区二区| 夜夜嗨av一区二区三区| 在线观看视频一区二区| 一区二区三区影院| 欧美日韩久久久久久| 天天亚洲美女在线视频| 欧美伦理影视网| 蜜臀久久99精品久久久久宅男 | 国产高清不卡一区二区| 久久丝袜美腿综合| 成人毛片在线观看| **网站欧美大片在线观看| 色综合久久天天| 亚洲成人黄色影院| 精品少妇一区二区三区在线视频| 国产美女一区二区三区| 国产欧美一区二区三区鸳鸯浴| 国产aⅴ精品一区二区三区色成熟| 国产精品视频九色porn| 欧美在线视频日韩| 蜜臀91精品一区二区三区| 久久人人爽爽爽人久久久| 成人性生交大片免费看视频在线| 亚洲日本欧美天堂| 在线播放国产精品二区一二区四区| 免费日韩伦理电影| 日本一区二区三区四区| 色欧美日韩亚洲| 蜜臀av性久久久久av蜜臀妖精| 国产亚洲污的网站| 日本乱码高清不卡字幕| 精品夜夜嗨av一区二区三区| 亚洲欧洲日产国码二区| 正在播放亚洲一区| youjizz国产精品| 日韩电影免费在线观看网站| 久久精品亚洲麻豆av一区二区| 91麻豆自制传媒国产之光| 日本女优在线视频一区二区| 国产精品家庭影院| 91精品国产高清一区二区三区蜜臀 | 中文字幕av在线一区二区三区| 一本色道久久综合亚洲aⅴ蜜桃| 秋霞午夜鲁丝一区二区老狼| 国产精品久久久久久亚洲毛片| 欧美精选午夜久久久乱码6080| 国产福利视频一区二区三区| 亚洲一区二区五区| 国产欧美一二三区| 欧美丰满一区二区免费视频| 北条麻妃一区二区三区| 激情五月婷婷综合网| 亚洲一区影音先锋| 国产精品免费观看视频| 日韩区在线观看| 欧美性感一类影片在线播放| 国产精品888| 老鸭窝一区二区久久精品| 亚洲黄色免费网站| 自拍偷拍欧美激情| 精品国产区一区| 日韩一区二区不卡| 欧美乱妇一区二区三区不卡视频| 不卡在线观看av| 国产精品一级黄| 久久黄色级2电影| 日韩福利视频导航| 亚洲电影一区二区| 亚洲卡通动漫在线| 国产精品久久久久久久久久久免费看 | 一区二区三区色| 国产精品色哟哟| 久久精品视频免费| 久久色在线观看| 精品国产a毛片| 欧美videossexotv100| 欧美一卡二卡三卡| 在线成人高清不卡| 91精品国产综合久久精品app| 欧美丝袜第三区| 欧美性猛交xxxx乱大交退制版 | 久久综合九色综合欧美98| 日韩精品一区二区三区在线 | 国产乱妇无码大片在线观看| 老司机免费视频一区二区| 蜜桃久久久久久| 国产一区在线观看麻豆| 国产成人99久久亚洲综合精品| 成人免费视频一区二区| jlzzjlzz国产精品久久| voyeur盗摄精品| 色婷婷亚洲婷婷| 欧美日韩成人一区二区| 欧美一区二区三区在线视频| 日韩免费看的电影| 久久久久久久久一| 国产精品国产a级| 一卡二卡三卡日韩欧美| 日本不卡免费在线视频| 精品无人码麻豆乱码1区2区| 国产盗摄精品一区二区三区在线| 成人毛片老司机大片| 欧洲av一区二区嗯嗯嗯啊| 在线播放中文一区| 久久久久久99久久久精品网站| 国产精品欧美一级免费| 一区二区三区中文字幕电影| 午夜av电影一区| 国产高清精品在线| 欧美日韩在线免费视频| 日韩一区二区在线观看| 久久久久久久久久久黄色| 日韩美女啊v在线免费观看| 香蕉成人啪国产精品视频综合网| 久久99精品久久久久久久久久久久 | 日韩av成人高清| 国产精品99久久久久久久女警| 色婷婷综合久久久久中文一区二区| 欧美女孩性生活视频| 久久久久久久久久久久久夜| 亚洲在线视频网站| 国产美女av一区二区三区| 色一情一伦一子一伦一区| 日韩视频国产视频| 亚洲精品成人a在线观看| 国产资源精品在线观看| 色先锋资源久久综合| 欧美不卡一区二区三区四区| 亚洲视频在线一区观看| 国产一区二区三区黄视频| 在线看一区二区| 中文字幕高清不卡| 久久精品99国产国产精| 色婷婷综合中文久久一本| 久久婷婷一区二区三区| 亚洲大片一区二区三区| 波多野结衣在线一区| 欧美一区二区三区男人的天堂| 亚洲美女在线一区| 国产成人精品www牛牛影视| 欧美日韩成人一区| 亚洲自拍偷拍欧美| 成人国产精品视频| 国产午夜亚洲精品理论片色戒| 天天亚洲美女在线视频| 在线观看日韩国产| 综合欧美亚洲日本| 国产成人高清在线| 国产亚洲一区字幕| 久久国产精品免费| 日韩一区二区免费在线电影| 亚洲一二三四在线| 色国产综合视频| 综合激情成人伊人| 91在线观看美女| 中文字幕在线观看不卡| 成人综合婷婷国产精品久久 | 成人精品亚洲人成在线| 久久亚洲一级片| 国产综合久久久久久鬼色| 91精品国产欧美一区二区成人| 亚洲国产裸拍裸体视频在线观看乱了| 91免费观看视频| 1000部国产精品成人观看| yourporn久久国产精品| 中文字幕中文字幕一区二区|