資源簡介
一共十個開發(fā)案例代碼,供大家使用
代碼片段和文件信息
///////////////////////////////////////////////////////////
//?DeJaved?by?mDeJava?v1.0.?Copyright?1999?MoleSoftware.?//
//???????To?download?last?version?of?this?software:??????//
//????????????http://molesoftware.hypermatr.net??????????//
//???????????????e-mail:molesoftware@mail.ru?????????????//
///////////////////////////////////////////////////////////
package?com.jspsmart.upload;
import?java.io.ByteArrayInputStream;
import?java.io.FileOutputStream;
import?java.io.IOException;
import?java.math.BigInteger;
import?java.sql.ResultSet;
import?java.sql.SQLException;
import?javax.servlet.ServletException;
//?Referenced?classes?of?package?com.jspsmart.upload:
//????????????SmartUploadException?SmartUpload
public?class?File
{
????private?SmartUpload?m_parent?=?null;
????private?int?m_startData?=?0;
????private?int?m_endData?=?0;
????private?int?m_size?=?0;
????private?String?m_fieldname?=?null;
????private?String?m_filename?=?null;
????private?String?m_fileExt?=?null;
????private?String?m_filePathName?=?null;
????private?String?m_contentType?=?null;
????private?String?m_contentDisp?=?null;
????private?String?m_typeMime?=?null;
????private?String?m_subTypeMime?=?null;
????private?String?m_contentString?=?null;
????private?boolean?m_isMissing?=?false;
????public?static?final?int?SAVEAS_AUTO?=?0;
????public?static?final?int?SAVEAS_VIRTUAL?=?1;
????public?static?final?int?SAVEAS_PHYSICAL?=?2;
????File()
????{
????????m_startData?=?0;
????????m_endData?=?0;
????????m_size?=?0;
????????m_fieldname?=?new?String();
????????m_filename?=?new?String();
????????m_fileExt?=?new?String();
????????m_filePathName?=?new?String();
????????m_contentType?=?new?String();
????????m_contentDisp?=?new?String();
????????m_typeMime?=?new?String();
????????m_subTypeMime?=?new?String();
????????m_contentString?=?new?String();
????????m_isMissing?=?true;
????}
????public?void?saveAs(String?s)
????????throws?IOException?SmartUploadException
????{
????????saveAs(s?0);
????}
????public?void?saveAs(String?s?int?i)
????????throws?IOException?SmartUploadException
????{
????????String?s1?=?new?String();
????????s1?=?m_parent.getPhysicalPath(s?i);
????????if(s1?==?null)
????????????throw?new?IllegalArgumentException(“There?is?no?specified?destination?file?(1140).“);
????????try
????????{
????????????java.io.File?file?=?new?java.io.File(s1);
????????????FileOutputStream?fileoutputstream?=?new?FileOutputStream(file);
????????????fileoutputstream.write(m_parent.m_binArray?m_startData?m_size);
????????????fileoutputstream.close();
????????}
????????catch(IOException?ioexception)
????????{
????????????throw?new?SmartUploadException(“File?can‘t?be?saved?(1120).“);
????????}
????}
????public?void?fileToField(ResultSet?resultset?String?s)
????????throws?ServletException?IOException?SmartUploadException?SQLException
????{
????????long?l?=?0L;
????????int?i?=?0x10000;
????????int?j?=?0;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-11-16?12:21??源碼\
?????目錄???????????0??2016-11-16?12:20??源碼\chapter01\
?????目錄???????????0??2016-11-16?12:20??源碼\chapter01\welcome\
?????文件?????????507??2005-02-03?01:06??源碼\chapter01\welcome\login.jsp
?????文件?????????609??2005-02-03?01:06??源碼\chapter01\welcome\welcome.jsp
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\css\
?????文件????????1841??2004-02-05?16:21??源碼\chapter03\oa\css\confirm.js
?????文件????????1532??2004-07-07?14:06??源碼\chapter03\oa\css\CSS.CSS
?????文件????????2021??2005-03-10?10:20??源碼\chapter03\oa\css\css_new.css
?????文件????????1298??2001-08-01?14:53??源碼\chapter03\oa\css\default.css
?????文件?????????500??2004-07-07?14:06??源碼\chapter03\oa\css\font.css
?????文件????????3002??2000-09-23?09:23??源碼\chapter03\oa\css\List.css
?????文件????????1663??2001-11-26?10:11??源碼\chapter03\oa\css\lnroad.css
?????文件?????????157??2005-03-10?18:29??源碼\chapter03\oa\css\logon.css
?????文件????????2007??2003-11-30?11:16??源碼\chapter03\oa\css\my_new.css
?????文件?????????371??2001-01-12?17:08??源碼\chapter03\oa\css\newmenu.css
?????文件?????????261??2001-11-13?13:23??源碼\chapter03\oa\css\Qpoint.css
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\databa
?????文件???????75776??2005-03-28?21:19??源碼\chapter03\oa\databa
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\image\
?????文件??????116219??2005-03-06?20:23??源碼\chapter03\oa\image\admin.jpg
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\image\index\
?????文件???????32949??2005-03-28?20:03??源碼\chapter03\oa\image\index\banner.jpg
?????文件?????????471??2005-03-10?09:47??源碼\chapter03\oa\image\index\banner_bg.gif
?????文件??????????53??2002-10-28?22:54??源碼\chapter03\oa\image\index\bg.gif
?????文件?????????173??2002-10-28?23:05??源碼\chapter03\oa\image\index\bg_line2.gif
?????文件?????????136??2005-03-10?09:38??源碼\chapter03\oa\image\index\logo3.gif
?????目錄???????????0??2016-11-16?12:20??源碼\chapter03\oa\image\index\menu\
?????文件????????2249??2005-03-28?20:08??源碼\chapter03\oa\image\index\menu\5c.gif
............此處省略5371個文件信息
- 上一篇:Maven中主要jar包集合
- 下一篇:springboot 分布式全家桶
評論
共有 條評論