java SmartUpload类问题 没有分了就这点了
我在网上看了很多修改SmartUpload类就可以下载中文名字的文件,但是我在反编译SmartUpload类后然后修改如下:
/*
* 由 ReJava v1.4 反编译
* Copyright 2005-2007 Apull
* 2007-9-25
* 源文件:SmartUpload.java
*/
package com.jspsmart.upload;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import
java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.sql.ResultSet;
import
java.sql.SQLException;
import java.util.Vector;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import
javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
// Referenced classes of package com.jspsmart.upload:
// Files, Request, SmartUploadException, File
public class SmartUpload
{
protected byte m_binArray[];
protected javax.servlet.http.HttpServletRequest m_request;
protected javax.servlet.http.HttpServletResponse m_response;
protected javax.servlet.ServletContext m_application;
private int m_totalBytes;
private int m_currentIndex;
private int m_startData;
private int m_endData;
private java.lang.String m_boundary;
private long m_totalMaxFileSize;
private long m_maxFileSize;
private java.util.Vector m_deniedFilesList;
private java.util.Vector m_allowedFilesList;
private boolean m_denyPhysicalPath;
private boolean m_forcePhysicalPath;
private java.lang.String m_contentDisposition;
public static final int SAVE_AUTO = 0;
public static final int SAVE_VIRTUAL = 1;
public static final int SAVE_PHYSICAL = 2;
private com.jspsmart.upload.Files m_files;
private com.jspsmart.upload.Request m_formRequest;
public SmartUpload()
{
m_totalBytes = 0;
m_currentIndex = 0;
m_startData = 0;
m_endData = 0;
m_boundary = new String();
m_totalMaxFileSize = 0L;
m_maxFileSize = 0L;
m_deniedFilesList = new Vector();
m_allowedFilesList = new Vector();
m_denyPhysicalPath = false;
m_forcePhysicalPath = false;
m_contentDisposition = new String();
m_files = new Files();
m_formRequest = new Request();
}
/**
* @deprecated Method init is deprecated
*/
public final void init(javax.servlet.ServletConfig config)
throws javax.servlet.
ServletException {
m_application = config.getServletContext();
}
/**
* @deprecated Method service is deprecated