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

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

?? archivepreverifier.java

?? 配置文件
?? JAVA
字號:
/**
 * Copyright (c) 2003-2005 Craig Setera
 * All Rights Reserved.
 * Licensed under the Eclipse Public License - v 1.0
 * For more information see http://www.eclipse.org/legal/epl-v10.html
 */
package eclipseme.preverifier;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;

import eclipseme.preverifier.results.PreverificationResults;

/**
 * A preverifier implementation for preverifying an 
 * archive file.
 * <p />
 * Copyright (c) 2003-2005 Craig Setera<br>
 * All Rights Reserved.<br>
 * Licensed under the Eclipse Public License - v 1.0<p/>
 * <br>
 * $Revision: 1.2 $
 * <br>
 * $Date: 2005/09/27 02:02:24 $
 * <br>
 * @author Craig Setera
 */
public class ArchivePreverifier {
	private ClassPreverifier classPreverifier;
	private IArchivePreverificationListener listener;

	/**
	 * Create a new archive preverifier with the specified
	 * policy and listener.
	 * 
	 * @param preverificationPolicy
	 * @param listener
	 */
	public ArchivePreverifier(
			IPreverificationPolicy preverificationPolicy,
			IArchivePreverificationListener listener)
	{
		super();
		
		classPreverifier = new ClassPreverifier(preverificationPolicy);
		this.listener = (listener == null) ? 
				new NullArchivePreverificationListener() : 
				listener;
	}

	/**
	 * Preverify the specified archive file using the specified classpath.
	 * 
	 * @param classStream
	 * @param classpath
	 * @return
	 * @throws IOException
	 */
	public void preverify(File archive, File outputFile, URL[] classpath)
			throws IOException
	{
		if ((archive == null) || (!archive.exists())) {
			throw new IllegalArgumentException("Archive must not be null or does not exist");
		}
		
		ClassLoader classLoader =
			new URLClassLoader(classpath, Thread.currentThread().getContextClassLoader());
		
		ZipFile zipArchive = new ZipFile(archive, ZipFile.OPEN_READ);
		ZipOutputStream zipStream = new ZipOutputStream(new FileOutputStream(outputFile));

		try {
			// Start me up...
			listener.fileBegin(zipArchive);
			
			Enumeration entries = zipArchive.entries();
			while (entries.hasMoreElements()) {
				ZipEntry entry = (ZipEntry) entries.nextElement();
				handleEntry(entry, zipArchive, zipStream, classLoader);
			}
			
			// All done...
			listener.fileEnd(zipArchive);
		} finally {
			if (zipStream != null) zipStream.close();
			if (zipArchive != null) zipArchive.close();
		}
	}

	/**
	 * Copy the non-content information about the ZipEntry.
	 * 
	 * @param entry
	 * @return
	 */
	private ZipEntry copyEntry(ZipEntry entry) {
		ZipEntry entryCopy = new ZipEntry(entry.getName());
		entryCopy.setComment(entry.getComment());
		entryCopy.setSize(entry.getSize());
		entryCopy.setTime(entry.getTime());
		
		return entryCopy;
	}

	/**
	 * Copy the specified ZipEntry from the source to the destination.
	 * 
	 * @param entry
	 * @param zipArchive
	 * @param zipStream
	 * @throws IOException
	 */
	private void copyEntryAndContents(ZipEntry entry, ZipFile zipArchive, ZipOutputStream zipStream) 
		throws IOException 
	{
		InputStream is = zipArchive.getInputStream(entry);
		ZipEntry entryCopy = copyEntry(entry);
		zipStream.putNextEntry(entryCopy);
		copyInputToOutput(is, zipStream);
	}

	/**
	 * Copy the contents of the input stream into the specified
	 * output stream.
	 * 
	 * @param is
	 * @param os
	 * @throws IOException
	 */
	private void copyInputToOutput(InputStream is, OutputStream os) 
		throws IOException
	{
		int bytesRead = 0;
		byte[] buffer = new byte[1024];
		
		while ((bytesRead = is.read(buffer)) != -1) {
			os.write(buffer, 0, bytesRead);
		}
	}
	
	/**
	 * Handle the specified entry in the incoming zip file.
	 * 
	 * @param entry
	 * @param zipArchive
	 * @param zipStream
	 * @param classpath
	 * @throws IOException 
	 */
	private void handleEntry(
		ZipEntry entry, 
		ZipFile zipArchive, 
		ZipOutputStream zipStream, 
		ClassLoader classLoader) 
			throws IOException 
	{
		if (!entry.isDirectory()) {
			String entryName = entry.getName();
			if (entryName.endsWith(".class")) {
				preverifyEntry(entry, zipArchive, zipStream, classLoader);
			} else {
				copyEntryAndContents(entry, zipArchive, zipStream);
			}
		}
	}

	/**
	 * Preverify the specified class entry in the zip file.
	 * 
	 * @param entry
	 * @param zipArchive
	 * @param zipStream
	 * @param classpath
	 * @throws IOException
	 */
	private boolean preverifyEntry(
		ZipEntry entry, 
		ZipFile zipArchive, 
		ZipOutputStream zipStream, 
		ClassLoader classLoader)
			throws IOException
	{
		boolean keepGoing =	listener.classBegin(zipArchive, entry);
		
		if (keepGoing) {
			InputStream is = zipArchive.getInputStream(entry);
			PreverificationResults results =
				classPreverifier.preverify(is, classLoader);

			if (!results.isErrorResult()) {
				ZipEntry entryCopy = copyEntry(entry);
				zipStream.putNextEntry(entryCopy);
				zipStream.write(results.getPreverifiedClassBytes());
			}
			
			keepGoing = listener.classEnd(zipArchive, entry, results);
		}
		
		return keepGoing;
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频一区国产视频| 麻豆成人久久精品二区三区红| 欧美videofree性高清杂交| 欧美精品一卡二卡| 欧美成人一区二区| 精品国产精品网麻豆系列| 精品国产乱子伦一区| 精品国产在天天线2019| 久久久久久久综合色一本| 久久久另类综合| 国产精品久久久久久久久免费相片 | 欧美日韩午夜影院| 欧美日韩亚洲综合在线| 欧美电影影音先锋| 日韩精品资源二区在线| 国产欧美一区二区精品秋霞影院| 国产精品美女久久福利网站| 亚洲视频一区二区在线观看| 一区二区三区不卡视频在线观看| 亚洲一区二区不卡免费| 另类综合日韩欧美亚洲| 国产精品一区在线观看乱码| av电影在线观看不卡| 欧美日本精品一区二区三区| 2014亚洲片线观看视频免费| 国产精品高潮呻吟| 性做久久久久久| 国产一区二区调教| 欧美在线小视频| 精品国产亚洲在线| 日韩理论在线观看| 美女看a上一区| 色综合欧美在线| 精品国产麻豆免费人成网站| 亚洲综合免费观看高清完整版在线| 美美哒免费高清在线观看视频一区二区| 狠狠色丁香婷婷综合| 日本精品裸体写真集在线观看| 91精品国产色综合久久| 亚洲三级在线观看| 精品一区二区三区香蕉蜜桃 | 日本韩国精品一区二区在线观看| 欧美一二三区精品| 亚洲免费av观看| 国产成人久久精品77777最新版本| 欧美性做爰猛烈叫床潮| 国产蜜臀av在线一区二区三区| 亚洲宅男天堂在线观看无病毒| 国产精品亚洲一区二区三区在线 | 美女视频第一区二区三区免费观看网站| 国产suv精品一区二区6| 精品对白一区国产伦| 亚洲成av人在线观看| 色伊人久久综合中文字幕| 久久欧美一区二区| 激情综合一区二区三区| 欧美视频一区二区三区| 中文字幕中文字幕一区| 国产99精品视频| 久久久久久久久97黄色工厂| 日韩国产在线观看一区| 欧美亚洲免费在线一区| 亚洲精品久久7777| 91蜜桃婷婷狠狠久久综合9色| 2022国产精品视频| 韩日精品视频一区| 欧美一激情一区二区三区| 亚洲制服丝袜av| 欧美网站一区二区| 一区二区三区视频在线观看| 色妞www精品视频| 亚洲色图丝袜美腿| 在线一区二区三区| 一区二区免费看| 欧美日韩一二区| 天天综合网 天天综合色| 欧美性色综合网| 视频一区在线播放| 7777精品伊人久久久大香线蕉 | 亚洲高清中文字幕| 欧美精品日韩一本| 美女一区二区视频| 久久一区二区三区四区| 国产成人免费视频精品含羞草妖精| 国产丝袜美腿一区二区三区| 丁香另类激情小说| 亚洲精品国产一区二区精华液| 欧美撒尿777hd撒尿| 麻豆成人免费电影| 国产精品美女久久久久久久久久久| 高清国产一区二区| 一区二区三区不卡视频| 日韩欧美中文字幕精品| 国产乱理伦片在线观看夜一区| 中文一区一区三区高中清不卡| 99久久婷婷国产综合精品电影| 亚洲美女免费在线| 日韩一区二区免费高清| 粉嫩一区二区三区性色av| 一区二区三区四区不卡视频| 欧美不卡在线视频| 91最新地址在线播放| 亚洲国产精品嫩草影院| 欧美刺激脚交jootjob| 99精品一区二区三区| 日韩高清一级片| 国产精品情趣视频| 宅男在线国产精品| 91在线视频网址| 免费精品视频最新在线| 中文字幕一区二区三区视频| 欧美精品1区2区3区| 国产精品66部| 午夜免费久久看| 国产精品婷婷午夜在线观看| 欧美高清视频不卡网| 国产suv精品一区二区三区| 午夜视黄欧洲亚洲| 自拍偷拍欧美激情| 精品久久久影院| 欧美日韩精品一区二区在线播放| 成人一区二区三区| 久久成人久久爱| 五月天中文字幕一区二区| 国产精品久久免费看| 精品电影一区二区| 欧美久久久影院| 99re在线精品| 丁香一区二区三区| 国内外成人在线| 免费xxxx性欧美18vr| 亚洲成年人网站在线观看| 日韩一区日韩二区| 欧美国产欧美综合| 久久久亚洲午夜电影| 欧美大片在线观看一区二区| 欧美日本高清视频在线观看| 一本到三区不卡视频| 成人高清视频在线| 国产成人精品一区二| 国产伦精一区二区三区| 韩国av一区二区三区四区| 免费成人在线观看视频| 亚洲电影视频在线| 香蕉av福利精品导航| 亚洲一卡二卡三卡四卡| 一区二区三区在线免费观看| 亚洲精品乱码久久久久久日本蜜臀| 亚洲色图色小说| 亚洲图片另类小说| 亚洲美女偷拍久久| 亚洲永久免费视频| 亚洲成av人影院| 日韩精品视频网| 久久99精品久久久久久动态图| 美女高潮久久久| 国产精品1区2区3区在线观看| 国产麻豆精品久久一二三| 国产成人av一区二区三区在线| 高清不卡在线观看av| 91丨九色丨蝌蚪富婆spa| 色呦呦一区二区三区| 欧美精品123区| 久久先锋资源网| 中文字幕一区二区视频| 一区二区视频在线看| 国产成人免费在线观看| 成人av免费在线观看| 国产福利91精品| 精品一区二区综合| 丁香啪啪综合成人亚洲小说| jiyouzz国产精品久久| 麻豆成人av在线| 国产福利不卡视频| 日韩免费视频一区| 亚洲午夜免费视频| 91视频com| 中文文精品字幕一区二区| 韩国av一区二区三区四区| 欧美精品乱码久久久久久| 亚洲精品一二三| 97久久精品人人澡人人爽| 日本一区二区视频在线观看| 蜜臀99久久精品久久久久久软件| 欧美三区在线观看| 亚洲精品一二三| 91在线观看高清| 中文字幕日本乱码精品影院| 国产一区二区按摩在线观看| 日韩欧美二区三区| 免费高清视频精品| 欧美一区二区视频在线观看| 亚洲a一区二区| 欧美一区二区三区在线观看| 日韩中文字幕区一区有砖一区| 欧美日本视频在线| 石原莉奈在线亚洲二区| 3d成人动漫网站| 久久草av在线| 久久亚洲精精品中文字幕早川悠里|