public class SmartUpload
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.ServletContext |
m_application |
protected byte[] |
m_binArray |
protected javax.servlet.http.HttpServletRequest |
m_request |
protected javax.servlet.http.HttpServletResponse |
m_response |
static int |
SAVE_AUTO |
static int |
SAVE_PHYSICAL |
static int |
SAVE_VIRTUAL |
| Constructor and Description |
|---|
SmartUpload() |
| Modifier and Type | Method and Description |
|---|---|
void |
downloadField(java.sql.ResultSet resultset,
java.lang.String s,
java.lang.String s1,
java.lang.String s2) |
void |
downloadFile(java.lang.String s) |
void |
downloadFile(java.lang.String s,
java.lang.String s1) |
void |
downloadFile(java.lang.String s,
java.lang.String s1,
java.lang.String s2) |
void |
downloadFile(java.lang.String s,
java.lang.String s1,
java.lang.String s2,
int i) |
void |
fieldToFile(java.sql.ResultSet resultset,
java.lang.String s,
java.lang.String s1) |
byte |
getBinaryData(int i) |
java.lang.String[] |
getFileNames() |
Files |
getFiles() |
protected java.lang.String |
getPhysicalPath(java.lang.String s,
int i) |
Request |
getRequest() |
int |
getSize() |
void |
init(javax.servlet.ServletConfig servletconfig)
Deprecated.
Method init is deprecated
|
void |
initialize(javax.servlet.jsp.PageContext pagecontext) |
void |
initialize(javax.servlet.ServletConfig servletconfig,
javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse) |
void |
initialize(javax.servlet.ServletContext servletcontext,
javax.servlet.http.HttpSession httpsession,
javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse,
javax.servlet.jsp.JspWriter jspwriter)
Deprecated.
Method initialize is deprecated
|
int |
save(java.lang.String s) |
int |
save(java.lang.String s,
int i) |
void |
service(javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse)
Deprecated.
Method service is deprecated
|
void |
setAllowedFilesList(java.lang.String s) |
void |
setCharset(java.lang.String l) |
void |
setContentDisposition(java.lang.String s) |
void |
setDeniedFilesList(java.lang.String s) |
void |
setDenyPhysicalPath(boolean flag) |
void |
setForcePhysicalPath(boolean flag) |
void |
setMaxFileSize(long l) |
void |
setTotalMaxFileSize(long l) |
void |
upload() |
void |
uploadInFile(java.lang.String s) |
protected byte[] m_binArray
protected javax.servlet.http.HttpServletRequest m_request
protected javax.servlet.http.HttpServletResponse m_response
protected javax.servlet.ServletContext m_application
public static final int SAVE_AUTO
public static final int SAVE_VIRTUAL
public static final int SAVE_PHYSICAL
public final void init(javax.servlet.ServletConfig servletconfig)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic void service(javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse)
throws javax.servlet.ServletException,
java.io.IOException
javax.servlet.ServletExceptionjava.io.IOExceptionpublic final void initialize(javax.servlet.ServletConfig servletconfig,
javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic final void initialize(javax.servlet.jsp.PageContext pagecontext)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic final void initialize(javax.servlet.ServletContext servletcontext,
javax.servlet.http.HttpSession httpsession,
javax.servlet.http.HttpServletRequest httpservletrequest,
javax.servlet.http.HttpServletResponse httpservletresponse,
javax.servlet.jsp.JspWriter jspwriter)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionpublic void upload()
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic int save(java.lang.String s)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic int save(java.lang.String s,
int i)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic java.lang.String[] getFileNames()
public int getSize()
public byte getBinaryData(int i)
public Files getFiles()
public Request getRequest()
public void downloadFile(java.lang.String s)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic void downloadFile(java.lang.String s,
java.lang.String s1)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic void downloadFile(java.lang.String s,
java.lang.String s1,
java.lang.String s2)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic void downloadFile(java.lang.String s,
java.lang.String s1,
java.lang.String s2,
int i)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionpublic void downloadField(java.sql.ResultSet resultset,
java.lang.String s,
java.lang.String s1,
java.lang.String s2)
throws javax.servlet.ServletException,
java.io.IOException,
java.sql.SQLException
javax.servlet.ServletExceptionjava.io.IOExceptionjava.sql.SQLExceptionpublic void fieldToFile(java.sql.ResultSet resultset,
java.lang.String s,
java.lang.String s1)
throws javax.servlet.ServletException,
java.io.IOException,
SmartUploadException,
java.sql.SQLException
javax.servlet.ServletExceptionjava.io.IOExceptionSmartUploadExceptionjava.sql.SQLExceptionpublic void setDeniedFilesList(java.lang.String s)
throws javax.servlet.ServletException,
java.io.IOException,
java.sql.SQLException
javax.servlet.ServletExceptionjava.io.IOExceptionjava.sql.SQLExceptionpublic void setAllowedFilesList(java.lang.String s)
public void setDenyPhysicalPath(boolean flag)
public void setForcePhysicalPath(boolean flag)
public void setContentDisposition(java.lang.String s)
public void setTotalMaxFileSize(long l)
public void setMaxFileSize(long l)
public void setCharset(java.lang.String l)
protected java.lang.String getPhysicalPath(java.lang.String s,
int i)
throws java.io.IOException
java.io.IOExceptionpublic void uploadInFile(java.lang.String s)
throws java.io.IOException,
SmartUploadException
java.io.IOExceptionSmartUploadException