資源簡(jiǎn)介
NULL
博文鏈接:https://lingf.iteye.com/blog/1108467

代碼片段和文件信息
/*jadclipse*///?Decompiled?by?Jad?v1.5.8g.?Copyright?2001?Pavel?Kouznetsov.
//?Jad?home?page:?http://www.kpdus.com/jad.html
//?Decompiler?options:?packimports(3)?radix(10)?lradix(10)?
//?Source?File?Name:???File.java
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
{
????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?destFilePathName)
????????throws?SmartUploadException?IOException
????{
????????saveAs(destFilePathName?0);
????}
????public?void?saveAs(String?destFilePathName?int?optionSaveAs)
????????throws?SmartUploadException?IOException
????{
????????String?path?=?new?String();
????????path?=?m_parent.getPhysicalPath(destFilePathName?optionSaveAs);
????????if(path?==?null)
????????????throw?new?IllegalArgumentException(“There?is?no?specified?destination?file?(1140).“);
????????try
????????{
????????????java.io.File?file?=?new?java.io.File(path);
????????????file.createNewFile();
????????????try
????????????{
????????????????FileOutputStream?fileOut?=?new?FileOutputStream(file);
????????????????fileOut.write(m_parent.m_binArray?m_startData?m_size);
????????????????fileOut.close();
????????????}
????????????catch(Exception?e)
????????????{
????????????????throw?new?IllegalArgumentException(“Path‘s?name?is?invalid?or?does?not?exist?(1135).“);
????????????}
????????}
????????catch(IOException?e)
????????{
????????????throw?new?SmartUploadException(“File?can‘t?be?saved?(1120).“);
????????}
????}
????public?void?fileToField(ResultSet?rs?String?columnName)
????????throws?SQLException?SmartUploadException?IOException?ServletException
????{
????????long?numBlocks?=?0L;
????????int?blockSize?=?65536;
????????int?leftOver?=?0;
????????int?pos?=?0;
????????if(rs?==?null)
????????????throw?new?IllegalArgumentException(“The?RecordSet?cannot?be?null?(1145).“);
????????if(columnName?==?null)
????????????throw?new?IllegalArgumentException(“The?columnName?cannot?be?null?(1150).“);
????????if(columnName.length()?==?0)
????????????throw?new?IllegalArgumentException(“The?columnName?cannot?be?empty?(1155).“);
????????numBlocks?=?BigInteger.valueOf(m_size).divide(BigInteger.valueOf(blockSize)).longValue();
????????leftOver?
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2011-06-28?19:55??源碼\
?????目錄???????????0??2011-06-28?19:55??源碼\com\
?????目錄???????????0??2011-06-28?19:55??源碼\com\jspsmart\
?????目錄???????????0??2011-06-28?19:55??源碼\com\jspsmart\upload\
?????文件????????7577??2011-06-28?14:28??源碼\com\jspsmart\upload\File.java
?????文件????????2067??2011-06-28?14:29??源碼\com\jspsmart\upload\Files.java
?????文件????????2350??2011-06-28?14:29??源碼\com\jspsmart\upload\Request.java
?????文件???????27351??2011-06-28?19:50??源碼\com\jspsmart\upload\SmartUpload.java
?????文件?????????684??2011-06-28?14:30??源碼\com\jspsmart\upload\SmartUploadException.java
評(píng)論
共有 條評(píng)論