📄 smartfile.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: SmartFile.java
package com.jspsmart.file;
import com.jspsmart.upload.Files;
import com.jspsmart.upload.Request;
import com.jspsmart.upload.SmartUpload;
import com.jspsmart.upload.SmartUploadException;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.text.DateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Hashtable;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
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.http.HttpUtils;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.PageContext;
// Referenced classes of package com.jspsmart.file:
// WildCard, Fso
public class SmartFile
{
private final int SAVE_AUTO = 0;
private final int SAVE_VIRTUAL = 1;
private final int SAVE_PHYSICAL = 2;
public static final int VIRTUAL = 1;
public static final int PHYSICAL = 2;
public static final int UPLOAD_FILE_FORM = 1;
public static final int NEW_FOLDER_FORM = 2;
public static final int FILES_PROPERTIES = 3;
public static final int FOLDERS_PROPERTIES = 4;
private ServletConfig m_config;
private ServletContext m_application;
private HttpServletRequest m_request;
private HttpServletResponse m_response;
private HttpSession m_session;
private PrintWriter m_outOld;
private JspWriter m_outNew;
private PageContext m_pageContext;
private String m_rootPath;
private int m_requestedAction;
private String m_strDefaultPath;
private boolean m_readOnly;
private boolean m_authentication;
private boolean m_denyPhysicalPath;
private boolean m_overWrite;
private boolean m_showHiddenFiles;
private boolean m_showProperties;
private boolean m_showToolbarText;
private boolean m_showPathSelect;
private boolean m_showFolderSize;
private int m_fileListPercentSize;
private int m_defaultSortOrder;
private int m_defaultSortField;
private String m_title;
private String m_iconsPath;
private String m_imagesPath;
private String m_language;
private String m_country;
private String m_jsEventHandler;
private String m_strAllowedFilesList;
private String m_strDeniedFilesList;
private Hashtable m_allowedFilesList;
private Hashtable m_deniedFilesList;
private String m_unvisibleFoldersList;
private String m_unvisibleFilesList;
private int m_inputFileSize;
private long m_maxFileSize;
private long m_quota;
private String m_fileSeparator;
private boolean m_isVirtual;
private int m_initialize;
private String m_contextPath;
private String m_fileName;
private String m_fileExtension;
private String m_mimeType;
private String m_filePhysicalPath;
private String m_fileRelativePath;
private String m_fileVirtualPath;
private String m_folderName;
private String m_folderPhysicalPath;
private String m_folderRelativePath;
private String m_folderVirtualPath;
private Locale currentLocale;
ResourceBundle labels;
ResourceBundle mimes;
ResourceBundle images;
ResourceBundle colors;
ResourceBundle icons;
private Hashtable m_properties;
static Class class$javax$servlet$http$HttpServletRequest; /* synthetic field */
static Class class$java$io$File; /* synthetic field */
public SmartFile()
{
m_rootPath = new String();
m_requestedAction = 0;
m_strDefaultPath = new String();
m_readOnly = false;
m_authentication = false;
m_denyPhysicalPath = false;
m_overWrite = true;
m_showHiddenFiles = false;
m_showProperties = true;
m_showToolbarText = true;
m_showPathSelect = true;
m_showFolderSize = true;
m_fileListPercentSize = 55;
m_defaultSortOrder = 1;
m_defaultSortField = 1;
m_title = new String("jspSmartFile");
m_iconsPath = new String("");
m_imagesPath = new String("");
m_language = new String();
m_country = new String();
m_jsEventHandler = new String();
m_strAllowedFilesList = new String();
m_strDeniedFilesList = new String();
m_allowedFilesList = new Hashtable();
m_deniedFilesList = new Hashtable();
m_unvisibleFoldersList = new String();
m_unvisibleFilesList = new String();
m_inputFileSize = 50;
m_quota = -1L;
m_fileSeparator = new String();
m_isVirtual = true;
m_initialize = 0;
m_contextPath = new String();
m_fileName = new String();
m_fileExtension = new String();
m_mimeType = new String();
m_filePhysicalPath = new String();
m_fileRelativePath = new String();
m_fileVirtualPath = new String();
m_folderName = new String();
m_folderPhysicalPath = new String();
m_folderRelativePath = new String();
m_folderVirtualPath = new String();
currentLocale = new Locale(Locale.getDefault().getLanguage(), Locale.getDefault().getCountry());
labels = ResourceBundle.getBundle("com.jspsmart.file.SmartFileLabels", currentLocale);
mimes = ResourceBundle.getBundle("com.jspsmart.file.SmartFileMIMETypes", currentLocale);
images = ResourceBundle.getBundle("com.jspsmart.file.SmartFileImages", currentLocale);
colors = ResourceBundle.getBundle("com.jspsmart.file.SmartFileColors", currentLocale);
icons = ResourceBundle.getBundle("com.jspsmart.file.SmartFileIcons", currentLocale);
m_properties = new Hashtable();
m_contextPath = null;
m_properties.put("NAME", new Integer(1));
m_properties.put("SIZE", new Integer(1));
m_properties.put("LINK", new Integer(1));
m_properties.put("URL", new Integer(1));
m_properties.put("TYPE", new Integer(1));
m_properties.put("LOCATION", new Integer(1));
m_properties.put("CONTAINS", new Integer(1));
m_properties.put("MODIFIED", new Integer(1));
m_properties.put("ATTRIBUTES", new Integer(1));
}
public final void init(ServletConfig servletconfig)
throws ServletException
{
m_config = servletconfig;
m_application = servletconfig.getServletContext();
m_initialize = 1;
}
public final void initialize(ServletConfig servletconfig, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
throws IOException, ServletException
{
m_config = servletconfig;
m_application = servletconfig.getServletContext();
m_request = httpservletrequest;
m_response = httpservletresponse;
m_initialize = 2;
Calendar calendar = Calendar.getInstance();
Calendar calendar1 = Calendar.getInstance();
calendar1.set(2003, 5, 1);
if(calendar.after(calendar1))
{
ResponseWriteLn("<HTML>");
ResponseWriteLn("<BODY bgcolor='white'>");
ResponseWriteLn("<font face=helv,helvetica size=2 color='red'>");
ResponseWriteLn("This is an evaluation version of jspSmartFile.<br>");
ResponseWriteLn("If you would like to use jspSmartFile<br>");
ResponseWriteLn("you must purchase the licensed version.<br><br>");
ResponseWriteLn("</strong></font>");
ResponseWriteLn("<font face=helv,helvetica color='blue' size=2>");
ResponseWriteLn("buy jspSmartFile online at <br>");
ResponseWriteLn("<a href='http://www.jspSmart.com'>");
ResponseWriteLn("http://www.jspSmart.com</a>.<br>");
ResponseWriteLn("</font>");
ResponseWriteLn("</BODY>");
ResponseWriteLn("</HTML>");
}
}
public final void initialize(PageContext pagecontext)
throws IOException, ServletException
{
m_pageContext = pagecontext;
m_application = pagecontext.getServletContext();
m_session = pagecontext.getSession();
m_request = (HttpServletRequest)pagecontext.getRequest();
m_response = (HttpServletResponse)pagecontext.getResponse();
m_outNew = pagecontext.getOut();
m_initialize = 3;
Calendar calendar = Calendar.getInstance();
Calendar calendar1 = Calendar.getInstance();
calendar1.set(2003, 5, 1);
if(calendar.after(calendar1))
{
ResponseWriteLn("<HTML>");
ResponseWriteLn("<BODY bgcolor='white'>");
ResponseWriteLn("<font face=helv,helvetica size=2 color='red'>");
ResponseWriteLn("This is an evaluation version of jspSmartFile.<br>");
ResponseWriteLn("If you would like to use jspSmartFile<br>");
ResponseWriteLn("you must purchase the licensed version.<br><br>");
ResponseWriteLn("</strong></font>");
ResponseWriteLn("<font face=helv,helvetica color='blue' size=2>");
ResponseWriteLn("buy jspSmartFile online at <br>");
ResponseWriteLn("<a href='http://www.jspSmart.com'>");
ResponseWriteLn("http://www.jspSmart.com</a>.<br>");
ResponseWriteLn("</font>");
ResponseWriteLn("</BODY>");
ResponseWriteLn("</HTML>");
}
}
public final void initialize(ServletContext servletcontext, HttpSession httpsession, HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse, JspWriter jspwriter)
throws IOException, ServletException
{
m_application = servletcontext;
m_session = httpsession;
m_request = httpservletrequest;
m_response = httpservletresponse;
m_outNew = jspwriter;
m_initialize = 4;
Calendar calendar = Calendar.getInstance();
Calendar calendar1 = Calendar.getInstance();
calendar1.set(2003, 5, 1);
if(calendar.after(calendar1))
{
ResponseWriteLn("<HTML>");
ResponseWriteLn("<BODY bgcolor='white'>");
ResponseWriteLn("<font face=helv,helvetica size=2 color='red'>");
ResponseWriteLn("This is an evaluation version of jspSmartFile.<br>");
ResponseWriteLn("If you would like to use jspSmartFile<br>");
ResponseWriteLn("you must purchase the licensed version.<br><br>");
ResponseWriteLn("</strong></font>");
ResponseWriteLn("<font face=helv,helvetica color='blue' size=2>");
ResponseWriteLn("buy jspSmartFile online at <br>");
ResponseWriteLn("<a href='http://www.jspSmart.com'>");
ResponseWriteLn("http://www.jspSmart.com</a>.<br>");
ResponseWriteLn("</font>");
ResponseWriteLn("</BODY>");
ResponseWriteLn("</HTML>");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -