91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 16.49MB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2023-06-20
  • 語言: 其他
  • 標簽: 網盤??開源??

資源簡介

一個相當經典的網盤系統 具有所有的功能 是初學者最好的學習案例

資源截圖

代碼片段和文件信息

package?com.lhq.prj.dd.action;

import?java.io.File;
import?java.io.FileInputStream;
import?java.io.FileNotFoundException;
import?java.io.FileOutputStream;
import?java.io.IOException;
import?java.io.InputStream;
import?java.io.UnsupportedEncodingException;
import?java.net.URLDecoder;
import?java.util.ArrayList;
import?java.util.Date;
import?java.util.List;

import?org.apache.tools.zip.ZipOutputStream;

import?com.lhq.prj.dd.core.baseAction;
import?com.lhq.prj.dd.core.MyUtils;
import?com.lhq.prj.dd.core.Page;
import?com.lhq.prj.dd.json.bean.MyFile;

/**
?*?FileAction.java?Create?on?2008-12-18?上午09:16:22
?*?
?*?說明:文件處理
?*?
?*?Copyright?(c)?2008?by?yourgame.
?*?
?*?@author?廖瀚卿
?*?@version?1.0
?*/
@SuppressWarnings(“serial“)
public?class?FileAction?extends?baseAction?{

public?static?final?String?ROOT?=?“root\\“;

private?File?myUpload;

private?String?myUploadContentType;

private?String?myUploadFileName;

private?String?path;

private?String?node;

private?List?nodes;

private?Page?page;

private?String?name;

private?String[]?paths;

private?boolean?success;

/**
?*?處理中文下載名
?*?
?*?@return
?*?@throws?UnsupportedEncodingException
?*/
public?String?getDownloadFileName()?throws?UnsupportedEncodingException?{
String?named?=?new?String(name.getBytes()?“ISO8859-1“);
return?named;
}

/**
?*?獲得文件下載流
?*?
?*?@return
?*?@throws?FileNotFoundException
?*/
public?InputStream?getInputStream()?throws?FileNotFoundException?{
return?getServletContext().getResourceAsStream(ROOT?+?path?+?“/“?+?name);
}

/**
?*?下載文件
?*?
?*?@return
?*/
public?String?download()?{
return?SUCCESS;
}

/**
?*?解壓縮文件
?*?
?*?@return
?*/
public?String?decompressionFiles()?{
String?rootPath?=?getSession().getServletContext().getRealPath(“/“);
rootPath?+=?ROOT;
File?file?=?new?File(rootPath);
if(!file.exists()){
file.mkdirs();
}
file?=?null;
String?extName?toPath?absPath;
boolean?flag?=?false;
try?{
for?(String?path?:?paths)?{
file?=?new?File(rootPath?+?path);
if?(file.isDirectory())?{
continue;
}
extName?=?path.substring(path.lastIndexOf(“.“)?+?1).toLowerCase();
toPath?=?rootPath?+?(((getPath()?!=?null)?&&?(getPath().length()?>?0))???getPath().substring(1)?:?““)
+?“\\“;
absPath?=?file.getAbsolutePath();
if?(“zip“.equals(extName))?{
flag?=?MyUtils.decompressionZipFiles(absPath?toPath);
}?else?if?(“rar“.equals(extName))?{
flag?=?MyUtils.decompressionRarFiles(absPath?toPath);
}
}
}?catch?(RuntimeException?e)?{
flag?=?false;
e.printStackTrace();
}?finally?{
file?=?null;
}
setSuccess(flag);
return?SUCCESS;
}

/**
?*?多文件下載
?*?
?*?@throws?IOException
?*/
public?String?downloadAll()?throws?IOException?{
// String?rootPath?=?getSession().getServletContext().getRealPath(“/“);
return?SUCCESS;
}

// public?I

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????345??2009-03-21?18:00??.settings\org.eclipse.core.resources.prefs

?????目錄??????????0??2009-01-07?23:29??.settings

?????文件????????727??2009-03-20?19:41??src\applicationContext-actions.xml

?????文件???????2317??2009-02-16?01:27??src\struts.xml

?????文件????????701??2008-12-27?20:28??src\log4j.properties

?????文件????????102??2008-12-27?20:28??src\struts.properties

?????文件???????1381??2009-01-27?21:31??src\com\lhq\prj\dd\json\bean\MyFile.java

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj\dd\json\bean

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj\dd\json

?????文件???????1312??2009-03-22?23:20??src\com\lhq\prj\dd\core\baseAction.java

?????文件??????21044??2009-03-22?10:39??src\com\lhq\prj\dd\core\MyUtils.java

?????文件???????1552??2008-12-27?20:28??src\com\lhq\prj\dd\core\Page.java

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj\dd\core

?????文件??????10444??2009-03-22?23:20??src\com\lhq\prj\dd\action\FileAction.java

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj\dd\action

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj\dd

?????目錄??????????0??2009-01-07?23:29??src\com\lhq\prj

?????目錄??????????0??2009-01-07?23:29??src\com\lhq

?????目錄??????????0??2009-01-07?23:29??src\com

?????目錄??????????0??2009-01-07?23:29??src

?????文件???????1352??2009-03-21?00:19??WebRoot\index.jsp

?????文件??????53877??2008-12-27?20:26??WebRoot\resources\resources.jsb

?????文件????????120??2009-01-07?09:26??WebRoot\resources\images\ext\orange\progress\progress-bg.gif

?????目錄??????????0??2009-01-07?23:28??WebRoot\resources\images\ext\orange\progress

?????文件?????????62??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tab-strip-bg.gif

?????文件????????181??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tab-btm-inactive-left-bg.gif

?????文件????????565??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tab-btm-inactive-right-bg.gif

?????文件????????576??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tab-btm-right-bg.gif

?????文件?????????62??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tab-strip-btm-bg.gif

?????文件???????1218??2008-12-27?20:27??WebRoot\resources\images\ext\orange\tabs\tabs-sprite.gif

............此處省略2367個文件信息

評論

共有 條評論