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

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

?? compressedinputstream.java

?? 用于JAVA數(shù)據(jù)庫(kù)連接.解壓就可用,方便得很
?? JAVA
字號(hào):
/* Copyright (C) 2002-2004 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as  published by the Free Software Foundation. There are special exceptions to the terms and conditions of the GPL  as it is applied to this software. View the full text of the  exception in file EXCEPTIONS-CONNECTOR-J in the directory of this  software distribution. This program 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 this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */package com.mysql.jdbc;import java.io.EOFException;import java.io.IOException;import java.io.InputStream;import java.sql.SQLException;import java.util.zip.DataFormatException;import java.util.zip.Inflater;/** * Used to de-compress packets from the MySQL server when protocol-level * compression is turned on. *  * @author Mark Matthews *  * @version $Id: CompressedInputStream.java,v 1.1.2.1 2005/05/13 18:58:37 *          mmatthews Exp $ */class CompressedInputStream extends InputStream {	/** The packet data after it has been un-compressed */	private byte[] buffer;	/** The connection that is using us (used to read config values) */	private Connection connection;	/** The stream we are reading from the server */	private InputStream in;	/** The ZIP inflater used to un-compress packets */	private Inflater inflater;	/**	 * The buffer to read packet headers into	 */	private byte[] packetHeaderBuffer = new byte[7];	/** The position we are reading from */	private int pos = 0;	/**	 * Creates a new CompressedInputStream that reads the given stream from the	 * server.	 * 	 * @param conn	 *            DOCUMENT ME!	 * @param streamFromServer	 */	public CompressedInputStream(Connection conn, InputStream streamFromServer) {		this.connection = conn;		this.in = streamFromServer;		this.inflater = new Inflater();	}	/**	 * @see java.io.InputStream#available()	 */	public int available() throws IOException {		if (this.buffer == null) {			return this.in.available();		}		return this.buffer.length - this.pos + this.in.available();	}	/**	 * @see java.io.InputStream#close()	 */	public void close() throws IOException {		this.in.close();		this.buffer = null;		this.inflater = null;	}	/**	 * Retrieves and un-compressed (if necessary) the next packet from the	 * server.	 * 	 * @throws IOException	 *             if an I/O error occurs	 */	private void getNextPacketFromServer() throws IOException {		byte[] uncompressedData = null;		int lengthRead = readFully(this.packetHeaderBuffer, 0, 7);		if (lengthRead < 7) {			throw new IOException("Unexpected end of input stream");		}		int compressedPacketLength = ((this.packetHeaderBuffer[0] & 0xff))				+ (((this.packetHeaderBuffer[1] & 0xff)) << 8)				+ (((this.packetHeaderBuffer[2] & 0xff)) << 16);		int uncompressedLength = ((this.packetHeaderBuffer[4] & 0xff))				+ (((this.packetHeaderBuffer[5] & 0xff)) << 8)				+ (((this.packetHeaderBuffer[6] & 0xff)) << 16);		if (this.connection.getTraceProtocol()) {			try {				this.connection.getLog().logTrace(						"Reading compressed packet of length "								+ compressedPacketLength + " uncompressed to "								+ uncompressedLength);			} catch (SQLException sqlEx) {				throw new IOException(sqlEx.toString()); // should never															// happen			}		}		if (uncompressedLength > 0) {			uncompressedData = new byte[uncompressedLength];			byte[] compressedBuffer = new byte[compressedPacketLength];			readFully(compressedBuffer, 0, compressedPacketLength);			try {				this.inflater.reset();			} catch (NullPointerException npe) {				this.inflater = new Inflater();			}			this.inflater.setInput(compressedBuffer);			try {				this.inflater.inflate(uncompressedData);			} catch (DataFormatException dfe) {				throw new IOException(						"Error while uncompressing packet from server.");			}			this.inflater.end();		} else {			if (this.connection.getTraceProtocol()) {				try {					this.connection							.getLog()							.logTrace(									"Packet didn't meet compression threshold, not uncompressing...");				} catch (SQLException sqlEx) {					throw new IOException(sqlEx.toString()); // should never																// happen				}			}			//				// Read data, note this this code is reached when using			// compressed packets that have not been compressed, as well			//			uncompressedData = new byte[compressedPacketLength];			readFully(uncompressedData, 0, compressedPacketLength);		}		if (this.connection.getTraceProtocol()) {			try {				this.connection.getLog().logTrace(						"Uncompressed packet: \n"								+ StringUtils.dumpAsHex(uncompressedData,										compressedPacketLength));			} catch (SQLException sqlEx) {				throw new IOException(sqlEx.toString()); // should never															// happen			}		}		if ((this.buffer != null) && (this.pos < this.buffer.length)) {			if (this.connection.getTraceProtocol()) {				try {					this.connection.getLog().logTrace(							"Combining remaining packet with new: ");				} catch (SQLException sqlEx) {					throw new IOException(sqlEx.toString()); // should never																// happen				}			}			int remaining = this.buffer.length - this.pos;			byte[] newBuffer = new byte[remaining + uncompressedData.length];			int newIndex = 0;			for (int i = this.pos; i < this.buffer.length; i++)				newBuffer[newIndex++] = this.buffer[i];			System.arraycopy(uncompressedData, 0, newBuffer, newIndex,					uncompressedData.length);			uncompressedData = newBuffer;		}		this.pos = 0;		this.buffer = uncompressedData;		return;	}	/**	 * Determines if another packet needs to be read from the server to be able	 * to read numBytes from the stream.	 * 	 * @param numBytes	 *            the number of bytes to be read	 * 	 * @throws IOException	 *             if an I/O error occors.	 */	private void getNextPacketIfRequired(int numBytes) throws IOException {		if ((this.buffer == null)				|| ((this.pos + numBytes) > this.buffer.length)) {			getNextPacketFromServer();		}	}	/**	 * @see java.io.InputStream#read()	 */	public int read() throws IOException {		try {			getNextPacketIfRequired(1);		} catch (IOException ioEx) {			return -1;		}		return this.buffer[this.pos++] & 0xff;	}	/**	 * @see java.io.InputStream#read(byte)	 */	public int read(byte[] b) throws IOException {		return read(b, 0, b.length);	}	/**	 * @see java.io.InputStream#read(byte, int, int)	 */	public int read(byte[] b, int off, int len) throws IOException {		if (b == null) {			throw new NullPointerException();		} else if ((off < 0) || (off > b.length) || (len < 0)				|| ((off + len) > b.length) || ((off + len) < 0)) {			throw new IndexOutOfBoundsException();		}		if (len <= 0) {			return 0;		}		try {			getNextPacketIfRequired(len);		} catch (IOException ioEx) {			return -1;		}		System.arraycopy(this.buffer, this.pos, b, off, len);		this.pos += len;		return len;	}	private final int readFully(byte[] b, int off, int len) throws IOException {		if (len < 0) {			throw new IndexOutOfBoundsException();		}		int n = 0;		while (n < len) {			int count = this.in.read(b, off + n, len - n);			if (count < 0) {				throw new EOFException();			}			n += count;		}		return n;	}	/**	 * @see java.io.InputStream#skip(long)	 */	public long skip(long n) throws IOException {		long count = 0;		for (long i = 0; i < n; i++) {			int bytesRead = read();			if (bytesRead == -1) {				break;			}			count++;		}		return count;	}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产99国产精品| 欧美a级一区二区| 日韩欧美中文字幕制服| youjizz国产精品| 美日韩黄色大片| 亚洲精品国久久99热| 久久久久久9999| 欧美一区二区三区在线视频 | 成人h版在线观看| 老司机精品视频线观看86| 一区二区在线观看免费视频播放 | 亚洲一区二区三区四区在线| 久久久久久久综合日本| 欧美伦理电影网| 色综合网站在线| 风间由美中文字幕在线看视频国产欧美| 午夜一区二区三区视频| **欧美大码日韩| 国产精品福利一区二区三区| 久久久久久麻豆| 精品久久国产老人久久综合| 在线成人高清不卡| 欧美日韩免费高清一区色橹橹| 99re这里只有精品6| 成人动漫av在线| 国产精品一区二区三区四区| 精品无码三级在线观看视频| 另类人妖一区二区av| 日韩国产欧美在线播放| 天天操天天综合网| 天堂午夜影视日韩欧美一区二区| 亚洲综合男人的天堂| 亚洲综合网站在线观看| 亚洲综合免费观看高清在线观看| 亚洲精品久久久久久国产精华液| 亚洲男同1069视频| 尤物视频一区二区| 亚洲精品视频一区二区| 一区二区三区久久| 亚洲一区二区不卡免费| 一区二区激情小说| 樱花影视一区二区| 亚洲第一av色| 天天综合天天综合色| 日韩中文字幕一区二区三区| 蜜桃传媒麻豆第一区在线观看| 久久精品国产精品青草| 国产精品一二三在| 国产suv一区二区三区88区| 成人性生交大片免费看中文| 波多野结衣视频一区| 99精品国产热久久91蜜凸| 91福利在线免费观看| 欧美日韩在线播放三区四区| 欧美精品久久99久久在免费线 | wwwwww.欧美系列| 国产日韩欧美制服另类| 中文字幕在线一区免费| 又紧又大又爽精品一区二区| 丝袜美腿亚洲一区| 狠狠色丁香久久婷婷综| 99国产精品久久久| 欧美日韩一本到| 精品国产一二三| 国产农村妇女毛片精品久久麻豆| 亚洲视频一二三| 男女男精品网站| 成人性生交大合| 欧美在线视频不卡| 欧美大胆一级视频| 日韩理论片在线| 日韩avvvv在线播放| 国产精品 日产精品 欧美精品| 91欧美一区二区| 日韩丝袜美女视频| 国产精品成人一区二区三区夜夜夜 | 自拍偷拍国产精品| 亚洲色欲色欲www| 亚洲黄色尤物视频| 久久se这里有精品| 91亚洲午夜精品久久久久久| 日韩视频免费直播| 国产精品久久久久久久蜜臀| 婷婷六月综合网| 粉嫩av亚洲一区二区图片| 在线观看91精品国产麻豆| 国产嫩草影院久久久久| 石原莉奈一区二区三区在线观看| 国产高清视频一区| 欧美日韩一二三| 国产欧美日韩不卡免费| 日日骚欧美日韩| aaa欧美色吧激情视频| 欧美成人a∨高清免费观看| 一区二区三区精品在线观看| 国产精品自在欧美一区| 在线成人免费观看| 亚洲欧美国产毛片在线| 国产大片一区二区| 欧美一区二区网站| 亚洲午夜三级在线| 99久久精品费精品国产一区二区| 中文字幕欧美三区| 日本韩国精品一区二区在线观看| 91精品国产欧美日韩| 亚洲视频在线一区二区| 国产精品99久久久久| 欧美精品乱人伦久久久久久| 亚洲天天做日日做天天谢日日欢| 韩国成人在线视频| 日韩亚洲国产中文字幕欧美| 亚洲国产综合在线| 一本到三区不卡视频| 亚洲国产成人在线| 国产精品自拍在线| 久久久久久久综合色一本| 麻豆成人综合网| 91.xcao| 午夜亚洲福利老司机| 色老头久久综合| 亚洲欧美日韩国产综合| 高清国产午夜精品久久久久久| 2023国产精华国产精品| 日本欧美在线观看| 欧美一二三四在线| 日韩专区一卡二卡| 欧美一卡2卡三卡4卡5免费| 午夜精品久久久久影视| 日韩在线观看一区二区| 91国偷自产一区二区使用方法| 国产精品福利在线播放| 成人av资源在线观看| 欧美国产1区2区| 成人午夜电影久久影院| 国产精品传媒在线| av网站一区二区三区| 中文字幕人成不卡一区| 99久久精品免费| 一区二区三区国产| 欧美日韩一区视频| 日韩不卡手机在线v区| 91精品福利在线一区二区三区 | 在线精品视频免费播放| 一区二区三区免费| 欧美日本韩国一区| 久久se精品一区精品二区| 精品久久一区二区| 国产成人免费在线| 亚洲区小说区图片区qvod| 在线欧美日韩精品| 日产国产欧美视频一区精品| 日韩欧美亚洲国产精品字幕久久久| 麻豆精品在线看| 久久久久久久久久久99999| av一区二区三区在线| 一区二区三区四区高清精品免费观看 | 亚洲一区在线观看网站| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 久久久午夜电影| 99久久99久久综合| 五月婷婷综合激情| 精品国产第一区二区三区观看体验| 国产美女在线精品| 亚洲视频在线一区观看| 91精品欧美久久久久久动漫| 国产自产v一区二区三区c| 成人欧美一区二区三区小说| 欧美系列日韩一区| 国产一区二区在线观看免费| 自拍视频在线观看一区二区| 欧美区一区二区三区| 国产一区二区精品在线观看| 亚洲欧美激情视频在线观看一区二区三区 | 欧美日韩一区二区在线观看视频 | 91捆绑美女网站| 日韩精品久久久久久| 一本一本大道香蕉久在线精品| 亚洲免费大片在线观看| 欧美精品三级日韩久久| 国产麻豆91精品| 一个色在线综合| 久久色在线视频| 欧美午夜电影一区| 国产精品亚洲专一区二区三区 | 另类综合日韩欧美亚洲| 中文字幕一区二区三区视频| 日韩一区二区在线观看| eeuss鲁片一区二区三区在线观看| 天天综合天天做天天综合| 中文字幕一区二区三区蜜月 | 中文子幕无线码一区tr| 欧美午夜一区二区三区| 成人性生交大合| 久久国产精品72免费观看| 亚洲主播在线观看| 欧美国产一区视频在线观看| 日韩欧美精品在线视频| 欧美性一级生活| 91免费国产视频网站| 国产成人日日夜夜|