📄 smartfile.java
字号:
if(s != null && s1 != null)
{
currentLocale = new Locale(s, s1);
labels = ResourceBundle.getBundle("com.jspsmart.file.SmartFileLabels", currentLocale);
try
{
mimes = ResourceBundle.getBundle("com.jspsmart.file.SmartFileMIMETypes", currentLocale);
}
catch(Exception exception)
{
System.out.println(exception.getMessage());
}
try
{
images = ResourceBundle.getBundle("com.jspsmart.file.SmartFileImages", currentLocale);
}
catch(Exception exception1)
{
System.out.println(exception1.getMessage());
}
try
{
colors = ResourceBundle.getBundle("com.jspsmart.file.SmartFileColors", currentLocale);
}
catch(Exception exception2)
{
System.out.println(exception2.getMessage());
}
try
{
icons = ResourceBundle.getBundle("com.jspsmart.file.SmartFileIcons", currentLocale);
}
catch(Exception exception3)
{
System.out.println(exception3.getMessage());
}
}
}
public Locale getLanguage()
{
return currentLocale;
}
public void setIconsPath(String s)
{
m_iconsPath = s + "/";
}
public String getIconsPath()
{
return m_iconsPath;
}
public void setImagesPath(String s)
{
m_imagesPath = s + "/";
}
public String getImagesPath()
{
return m_imagesPath;
}
public void setDiskSpaceQuota(long l)
{
m_quota = l;
}
public long getDiskSpaceQuota()
{
return m_quota;
}
public void setShowProperties(boolean flag)
{
m_showProperties = flag;
}
public boolean getShowProperties()
{
return m_showProperties;
}
public void setReadOnly(boolean flag)
{
m_readOnly = flag;
}
public boolean getReadOnly()
{
return m_readOnly;
}
public void setForceAuthentication(boolean flag)
{
m_authentication = flag;
}
public boolean getForceAuthentication()
{
return m_authentication;
}
public void setDeniedFilesList(String s)
throws ServletException, IOException
{
int i = 1;
boolean flag = false;
String s1 = "";
m_strDeniedFilesList = s;
if(s != null)
{
for(int j = 0; j < s.length(); j++)
{
s1 = s1 + s.charAt(j);
if(s.charAt(j) == ',')
{
s1 = s1.substring(0, s1.length() - 1);
m_deniedFilesList.put(new Integer(i), s1);
s1 = "";
i++;
}
if(j + 1 == s.length() && s1 != "")
{
m_deniedFilesList.put(new Integer(i), s1);
s1 = "";
i++;
}
}
if(s.indexOf(",,") >= 0)
m_deniedFilesList.put(new Integer(i), "");
} else
{
m_deniedFilesList = null;
}
}
public String getDeniedFilesList()
{
return m_deniedFilesList.toString();
}
public void setAllowedFilesList(String s)
{
int i = 1;
boolean flag = false;
String s1 = "";
m_strAllowedFilesList = s;
if(s != null)
{
for(int j = 0; j < s.length(); j++)
{
s1 = s1 + s.charAt(j);
if(s.charAt(j) == ',')
{
s1 = s1.substring(0, s1.length() - 1);
m_allowedFilesList.put(new Integer(i), s1);
s1 = "";
i++;
}
if(j + 1 == s.length() && s1 != "")
{
m_allowedFilesList.put(new Integer(i), s1);
s1 = "";
i++;
}
}
if(s.indexOf(",,") >= 0)
m_allowedFilesList.put(new Integer(i), "");
} else
{
m_allowedFilesList = null;
}
}
public String getAllowedFilesList()
{
return m_allowedFilesList.toString();
}
public void setUnvisibleFilesList(String s)
{
m_unvisibleFilesList = s;
}
public String getUnvisibleFilesList()
{
return m_unvisibleFilesList;
}
public void setUnvisibleFoldersList(String s)
{
m_unvisibleFoldersList = s;
}
public String getUnvisibleFoldersList()
{
return m_unvisibleFoldersList;
}
public void setDenyPhysicalPath(boolean flag)
{
m_denyPhysicalPath = flag;
}
public boolean getDenyPhysicalPath()
{
return m_denyPhysicalPath;
}
public void setContextPath(String s)
{
m_contextPath = s;
}
public String getContextPath()
{
return m_contextPath;
}
public void setMaxFileSize(long l)
{
m_maxFileSize = l;
}
public long getMaxFileSize()
{
return m_maxFileSize;
}
public void setOverWrite(boolean flag)
{
m_overWrite = flag;
}
public boolean getOverWrite()
{
return m_overWrite;
}
public void setShowFolderSize(boolean flag)
{
m_showFolderSize = flag;
}
public boolean getShowFolderSize()
{
return m_showFolderSize;
}
public void setShowPathSelect(boolean flag)
{
m_showPathSelect = flag;
}
public boolean getShowPathSelect()
{
return m_showPathSelect;
}
public void setFileListPercentSize(int i)
{
if(i >= 0 && i <= 100)
m_fileListPercentSize = i;
}
public int getFileListPercentSize()
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -