// Decompiled Using: FrontEnd Plus v2.03 and the JAD Engine
// Available From: http://www.reflections.ath.cx
// Decompiler options: packimports(3)
// Source File Name: upBean.java
package upload;
import java.io.IOException;
import java.io.InputStream;
import java.util.Vector;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.PageContext;
// Referenced classes of package xiaoxiang.fileUpload:
// files, Request, file
public class upBean
{
public upBean()
{
m_files = new files();
m_totalBytes = 0;
m_currentIndex = 0;
m_startData = 0;
m_endData = 0;
m_boundary = new String();
m_totalMaxFileSize = 0L;
m_maxFileSize = 0L;
m_allowedExtList = new Vector();
m_allowedFileTypeList = new Vector();
m_formRequest = new Request();
m_count = 0;
isCover = true;
realPath = new String();
}
public final void initialize(PageContext pagecontext)
throws ServletException
{
m_application = pagecontext.getServletContext();
m_request = (HttpServletRequest)pagecontext.getRequest();
m_response = (HttpServletResponse)pagecontext.getResponse();
}
/**
* @deprecated Method setRealPath is deprecated
*/
public void setRealPath(String pRealPath)
{
realPath = pRealPath;
}
public String getRealPath()
{
return realPath;
}
public void setIsCover(boolean pIsCover)
{
isCover = pIsCover;
}
public void upload()
throws ServletException, IOException, Exception
{
int i = 0;
long maxSize = 0L;
boolean isBoundaryEnd = false;
String sFileName = new String();
String fileExtName = new String();
String dataFieldValue = new String();
String contentType = new String();
String typeMIME = new String();
String subTypeMIME = new String();
m_totalBytes = m_request.getContentLength();
m_binArray = new byte[m_totalBytes];
int j;
for(; i < m_totalBytes; i += j)
try
{
m_request.getInputStream();
j = m_request.getInputStream().read(m_binArray, i, m_totalBytes - i);
}
catch(Exception exception)
{
throw new Exception("Unable to upload.");
}
for(; !isBoundaryEnd && m_currentIndex < m_totalBytes; m_currentIndex++)
if(m_binArray[m_currentIndex] == 13)
isBoundaryEnd = true;
else
m_boundary += (char)m_binArray[m_currentIndex];
if(m_currentIndex == 1)
return;
for(m_currentIndex++; m_currentIndex < m_totalBytes; m_currentIndex += 2)
{
String dataHeader = getDataHeader();
m_currentIndex += 2;
boolean isFileObject = dataHeader.indexOf("filename") > 0;
String fieldName = getDataFieldValue(dataHeader, "name");
if(isFileObject)
{
dataFieldValue = getDataFieldValue(dataHeader, "filename");
sFileName = getFileName(dataFieldValue);
fileExtName = getFileExt(sFileName);
contentType = getContentType(dataHeader);
typeMIME = getTypeMIME(contentType);
subTypeMIME = getSubTypeMIME(contentType);
}
getDataSection();
m_size = (m_endData - m_startData) + 1;
if(isFileObject && sFileName.length() > 0)
{
if(!m_allowedExtList.isEmpty() && !m_allowedExtList.contains(fileExtName))
throw new SecurityException("\u60A8\u7684\u6587\u4EF6\u540E\u7F00\u540D\u4E0D\u7B26\u5408\u6211\u4EEC\u7684\u8BBE\u5B9A.\u6211\u4EEC\u53EA\u5141\u8BB8\u4EE5\u4E0B\u540E\u7F00\u540D\u7684\u6587\u4EF6\uFF1A" + m_allowedExtList.toString());
if(!m_allowedFileTypeList.isEmpty() && !m_allowedFileTypeList.contains(subTypeMIME))
throw new SecurityException("\u60A8\u7684\u6587\u4EF6\u7C7B\u578B\u4E0D\u7B26\u5408\u6211\u4EEC\u7684\u8BBE\u5B9A.\u6211\u4EEC\u53EA\u5141\u8BB8\u4EE5\u4E0B\u7C7B\u578B\u7684\u6587\u4EF6\uFF1A" + m_allowedFileTypeList.toString());
if(m_maxFileSize > 0L && (long)((m_endData - m_startData) + 1) > m_maxFileSize)
throw new SecurityException("\u60A8\u4E0A\u4F20\u7684\u8FD9\u4E2A\u6587\u4EF6\u8D85\u8FC7\u4E86\u6211\u4EEC\u7684\u9650\u5236 : " + sFileName + ".\u6587\u4EF6\u7684\u5355\u4E2A\u5927\u5C0F\u5E94\u5C0F\u4E8E" + (m_maxFileSize / 1000L + 1L) + "kb");
maxSize += (m_endData - m_startData) + 1;
if(m_totalMaxFileSize > 0L && maxSize > m_totalMaxFileSize)
throw new SecurityException("\u60A8\u4E0A\u4F20\u7684\u6587\u4EF6\u603B\u5927\u5C0F\u8D85\u8FC7\u4E86\u6211\u4EEC\u7684\u9650\u5236:" + (m_totalMaxFileSize / 1000L + 1L) + "kb");
m_files.addFile(new file(sFileName, m_startData, (m_endData - m_startData) + 1, m_count, subTypeMIME, this));
m_count++;
}
if(!isFileObject)
{
String s11 = new String(m_binArray, m_startData, (m_endData - m_startData) + 1);
m_formRequest.putParameter(fieldName, s11);
}
if((char)m_binArray[m_currentIndex + 1] == '-')
break;
}
}
private String getDataFieldValue(String s, String s1)
{
String s2 = new String();
String s3 = new String();
int i = 0;
boolean flag = false;
boolean flag1 = false;
boolean flag2 = false;
s2 = s1 + "=" + '"';
i = s.indexOf(s2);
if(i > 0)
{
int j = i + s2.length();
int k = j;
s2 = "\"";
int l = s.indexOf(s2, j);
if(k > 0 && l > 0)
s3 = s.substring(k, l);
}
return s3;
}
private String getFileExt(String s)
{
String s1 = new String();
int i = 0;
int j = 0;
if(s == null)
return null;
i = s.lastIndexOf('.') + 1;
j = s.length();
s1 = s.substring(i, j);
if(s.lastIndexOf('.') > 0)
return s1;
else
return "";
}
private String getContentType(String s)
{
String s1 = new String();
String s2 = new String();
int i = 0;
boolean flag = false;
s1 = "Content-Type:";
i = s.indexOf(s1) + s1.length();
if(i != -1)
{
int j = s.length();
s2 = s.substring(i, j);
}
return s2;
}
private String getTypeMIME(String s)
{
String s1 = new String();
int i = 0;
i = s.indexOf("/");
if(i != -1)
return s.substring(1, i);
else
return s;
}
private String getSubTypeMIME(String s)
{
String s1 = new String();
int i = 0;
boolean flag = false;
i = s.indexOf("/") + 1;
if(i != -1)
{
int j = s.length();
return s.substring(i, j);
} else
{
return s;
}
}
private void getDataSection()
{
boolean flag = false;
String s = new String();
int i = m_currentIndex;
int j = 0;
int k = m_boundary.length();
m_startData = m_currentIndex;
m_endData = 0;
while(i < m_totalBytes)
if(m_binArray[i] == (byte)m_boundary.charAt(j))
{
if(j == k - 1)
{
m_endData = ((i - k) + 1) - 3;
break;
}
i++;
j++;
} else
{
没有合适的资源?快使用搜索试试~ 我知道了~
基于JavaScript的家庭理财管理系统设计源码
共398个文件
js:129个
css:58个
png:55个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 7 浏览量
2024-04-11
23:40:21
上传
评论
收藏 30.33MB ZIP 举报
温馨提示
本源码提供了一个基于JavaScript的家庭理财管理系统设计。项目包含398个文件,其中包括129个JavaScript文件、58个CSS样式文件、55个PNG图片、37个JSP页面、27个JAR文件、21个JPG图片、9个Class文件、9个GIF图片和9个Java源文件。这个系统是一个家庭理财管理系统,可能包括管理员和家庭成员的功能,如财务管理、财务类型管理、财务计划管理、家庭财务报表、用户管理、支出排行等,适合用于家庭理财和财务管理。
资源推荐
资源详情
资源评论
收起资源包目录
基于JavaScript的家庭理财管理系统设计源码 (398个子文件)
upBean.class 8KB
file.class 3KB
HibernateSessionFactory.class 2KB
db.class 2KB
Cai.class 2KB
User.class 2KB
Request.class 2KB
files.class 1KB
Types.class 928B
summernote-bs3.css 143KB
bootstrap.min.css 120KB
style.min.css 111KB
bootstrap.min.css 108KB
style.css 91KB
animate.css 69KB
animate.min.css 53KB
datepicker3.css 33KB
font-awesome.min.css 27KB
font-awesome.min.css 26KB
ambiance.css 25KB
style.min.css 25KB
sweetalert.css 22KB
sweetalert.css 18KB
simditor.css 17KB
jquery-ui.min.css 16KB
jasny-bootstrap.min.css 14KB
chosen.css 12KB
dropzone.css 11KB
layim.css 11KB
fullcalendar.css 11KB
summernote.css 10KB
responsive.css 10KB
plyr.css 10KB
owl.carousel.css 7KB
codemirror.css 7KB
blueimp-gallery.min.css 7KB
awesome-bootstrap-checkbox.css 7KB
toastr.min.css 7KB
webuploader-demo.min.css 6KB
jquery.steps.css 6KB
footable.core.css 5KB
jquery.fancybox.css 5KB
cropper.css 5KB
dataTables.bootstrap.css 5KB
bootstrap-table.min.css 4KB
cropper.min.css 4KB
clockpicker.css 4KB
basic.css 4KB
bootstrap-colorpicker.min.css 3KB
cropper.min.css 3KB
ion.rangeSlider.css 3KB
jquery.nouislider.css 3KB
meanmenu.min.css 3KB
bootstrap-markdown.min.css 3KB
jquery.gritter.css 3KB
bwizard.css 2KB
bwizard.min.css 2KB
ion.rangeSlider.skinFlat.css 2KB
login.min.css 2KB
sitelogo.css 2KB
custom.css 1KB
nivo-slider.css 1KB
bootstrap-treeview.css 1KB
fullcalendar.print.css 668B
switchery.css 610B
webuploader.css 515B
morris-0.4.3.min.css 442B
ui.jqgrid.css_0820 16KB
fontawesome-webfont.eot 69KB
glyphicons-halflings-regular.eot 20KB
footable.eot 5KB
fontawesome-webfont.eot_ 67KB
glyphicons-halflings-regular.eot_ 20KB
footable.eot_ 5KB
fancybox_loading@2x.gif 14KB
fancybox_loading.gif 6KB
loading.gif 4KB
throbber.gif 2KB
loading-upload.gif 2KB
loading.gif 166B
dialogclose.gif 114B
blank.gif 43B
ie-spacer.gif 43B
favicon.ico 31KB
soosoo_vonia.iml 458B
hibernate3.jar 2.31MB
mysql-connector-java-8.0.21.jar 2.29MB
ojdbc6.jar 2.05MB
poi-3.9.jar 1.78MB
mysql-connector-java-5.1.25.jar 829KB
javassist-3.9.0.GA.jar 583KB
commons-collections-3.1.jar 546KB
sqljdbc4.jar 525KB
antlr-2.7.6.jar 433KB
jstl-1.2.jar 405KB
standard-1.1.2.jar 384KB
jstl-impl.jar 379KB
log4j-1.2.14.jar 359KB
dom4j-1.6.1.jar 307KB
hibernate-annotations.jar 273KB
共 398 条
- 1
- 2
- 3
- 4
资源评论
沐知全栈开发
- 粉丝: 5701
- 资源: 5216
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功