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

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

?? compressedinputstream.java

?? mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序 mysql jdbc驅動程序
?? JAVA
字號:
/* 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;	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产三级| 久久久不卡网国产精品二区| 国产精品国产三级国产有无不卡 | 亚洲国产精品久久人人爱| 播五月开心婷婷综合| 亚洲欧美成人一区二区三区| 久久成人av少妇免费| **网站欧美大片在线观看| 国产一区二区三区四| 欧美日韩和欧美的一区二区| 中文字幕一区二区三区乱码在线| 亚洲免费伊人电影| 99久久精品国产一区| 日韩欧美一级在线播放| 风间由美中文字幕在线看视频国产欧美| ㊣最新国产の精品bt伙计久久| 色婷婷久久久亚洲一区二区三区| 亚洲成a人片综合在线| 亚洲精品在线电影| 色欲综合视频天天天| 日韩综合在线视频| 国产精品传媒在线| 制服丝袜中文字幕亚洲| 国产xxx精品视频大全| 中文字幕色av一区二区三区| 欧美亚洲日本国产| 成人激情校园春色| 日本视频在线一区| 亚洲欧美福利一区二区| 久久综合精品国产一区二区三区| 色偷偷一区二区三区| 久久精品99久久久| 一区二区三区在线免费| 亚洲精品一区二区精华| 欧美视频一区二区三区| 成人精品免费网站| 久久国产精品72免费观看| 亚洲欧美日韩一区| 国产情人综合久久777777| 欧美军同video69gay| 91丝袜美女网| 国产成人精品免费一区二区| 三级欧美在线一区| 亚洲综合在线第一页| 国产精品久线观看视频| 久久久久久9999| 欧美第一区第二区| 欧美精三区欧美精三区| 色哟哟日韩精品| 91蜜桃免费观看视频| 国产不卡免费视频| 国产99久久久国产精品潘金网站| 蜜臀av亚洲一区中文字幕| 亚洲亚洲人成综合网络| 亚洲色图在线播放| 亚洲欧美区自拍先锋| 欧美精品精品一区| 成人高清视频在线| 国产精品区一区二区三| 精品国产乱码久久久久久蜜臀 | 欧美午夜精品久久久久久超碰| 日日摸夜夜添夜夜添精品视频 | 欧美性色欧美a在线播放| 国产麻豆精品在线| 美女视频黄 久久| 日本成人在线一区| 麻豆91精品视频| 国产在线精品一区二区| 国产一区二区不卡| 成人午夜av电影| 一本一道波多野结衣一区二区| 一本一道波多野结衣一区二区| 91福利国产精品| 欧美日韩精品二区第二页| 在线综合视频播放| 精品欧美久久久| 日本一区二区三级电影在线观看| 久久精品视频一区二区三区| 亚洲欧美国产高清| 99视频精品全部免费在线| 成人午夜激情在线| 国产尤物一区二区| 久久蜜桃av一区精品变态类天堂 | av在线一区二区| 精品一区精品二区高清| 欧美精选午夜久久久乱码6080| 中文字幕欧美区| 午夜精品视频在线观看| 日本aⅴ免费视频一区二区三区| 国产精品一区二区久久不卡| 欧美tickling挠脚心丨vk| 日韩一区二区三区视频在线观看| 亚洲精品欧美专区| 美女一区二区在线观看| 色天使色偷偷av一区二区| 欧美国产精品专区| 午夜精品久久久久| 日本电影亚洲天堂一区| 欧美精品一区二区三| 五月婷婷另类国产| 成人aa视频在线观看| 欧美在线视频全部完| 欧美一区二区三区免费观看视频 | 欧美一卡2卡三卡4卡5免费| 国产欧美中文在线| 国产很黄免费观看久久| 中文无字幕一区二区三区| www.亚洲激情.com| 蜜臀av一区二区| 欧美成人精品3d动漫h| 麻豆成人久久精品二区三区红 | 亚洲欧洲性图库| 国产乱码一区二区三区| 亚洲精品一区二区三区在线观看| 一本大道久久a久久精品综合| 欧美一区二区三级| 最新热久久免费视频| 精品一区二区免费| 欧美日韩精品电影| 国产精品久99| 成人影视亚洲图片在线| 欧美一区二区三区公司| 亚洲一级二级在线| 在线亚洲人成电影网站色www| 欧美一级淫片007| 欧美一区二区性放荡片| 欧美日韩一区高清| 欧美日韩免费观看一区三区| 毛片基地黄久久久久久天堂| 国产欧美精品一区二区三区四区| 色94色欧美sute亚洲线路一ni | 欧美年轻男男videosbes| 亚洲免费观看高清完整版在线观看| 精品国产免费视频| 成人动漫一区二区三区| 亚洲一区自拍偷拍| 成人欧美一区二区三区黑人麻豆| 成人aa视频在线观看| 国产专区综合网| 亚洲成人一区二区| 成人性生交大片免费看视频在线| 玉米视频成人免费看| 国产三级一区二区| 成人精品小蝌蚪| 欧美变态tickling挠脚心| 亚洲特黄一级片| 最新久久zyz资源站| 蜜臀久久久99精品久久久久久| 欧美一区二区三区色| 中文字幕亚洲精品在线观看| 欧美国产日韩一二三区| 日韩女优av电影| 亚洲欧美日韩精品久久久久| 天天综合日日夜夜精品| 亚洲女同女同女同女同女同69| 国产欧美日产一区| 亚洲精品视频免费看| 国产精品三级av在线播放| 久久综合色综合88| 日韩在线观看一区二区| 麻豆一区二区99久久久久| 欧美精品第1页| 国产精品国产a| 久久se这里有精品| 69av一区二区三区| 久久久久亚洲综合| 国产精品人成在线观看免费| 亚洲欧美二区三区| 成人ar影院免费观看视频| 色老综合老女人久久久| 欧美日韩日日夜夜| 国产精品伦理在线| 国产在线一区二区| 欧美亚洲愉拍一区二区| 亚洲视频每日更新| 波多野结衣中文字幕一区 | 国产精品色在线观看| 国产精品久久久久aaaa樱花 | 一本一道波多野结衣一区二区| av电影天堂一区二区在线| 亚洲激情成人在线| 亚洲成国产人片在线观看| 在线视频欧美精品| 亚洲综合一区二区三区| 欧美三级电影在线看| 精品一区二区在线免费观看| 国产亚洲人成网站| 成人aaaa免费全部观看| 最新国产の精品合集bt伙计| 94色蜜桃网一区二区三区| 一区二区三区国产精品| 99精品久久只有精品| 国产免费观看久久| 97久久久精品综合88久久| 日韩视频在线一区二区| 亚洲国产裸拍裸体视频在线观看乱了 | 在线观看视频91| 青娱乐精品在线视频| 中文字幕一区二区视频| 精品人在线二区三区|