From 239c32b85e68a055428648f07aa81e6e252dadf4 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 13 Oct 2016 13:46:36 +0800 Subject: [PATCH] update --- .../src/com/fr/design/extra/PluginHelper.java | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 302b6df8e3..f510646f84 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -153,32 +153,6 @@ public class PluginHelper { installDependenceOnline(currentID, needInstallDependence); } - public static void installCoverDependence(PluginDependenceUnit dependenceUnit) throws Exception { - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(dependenceUnit.getDependenceID())); - if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { - InputStream reader = httpClient.getResponseStream(); - String temp = StableUtils.pathJoin(PluginHelper.DEPENDENCE_DOWNLOAD_PATH, PluginHelper.TEMP_FILE); - StableUtils.makesureFileExist(new File(temp)); - FileOutputStream writer = new FileOutputStream(temp); - byte[] buffer = new byte[PluginConstants.BYTES_NUM]; - int bytesRead = 0; - while ((bytesRead = reader.read(buffer)) > 0) { - writer.write(buffer, 0, bytesRead); - buffer = new byte[PluginConstants.BYTES_NUM]; - } - reader.close(); - writer.flush(); - writer.close(); - - - //安装文件 - IOUtils.unZipFilesGBK(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); - }else { - throw new PluginDependenceException(); - } - } - - /** * 构造一个下载UI * @param currentID