⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smartfile.java

📁 对学习 VC有所帮助的几个例子
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
    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()
    {
        return m_fileListPercentSize;
    }

    public void setFileListDefaultSortField(int i)
    {
        if(i > 0 && i < 5)
            m_defaultSortField = i;
    }

    public int getFileListDefaultSortField()
    {
        return m_defaultSortField;
    }

    public void setFileListDefaultSortOrder(int i)
    {
        if(i == 0 || i == 1)
            m_defaultSortOrder = i;
    }

    public int getFileListDefaultSortOrder()
    {
        return m_defaultSortOrder;
    }

    public void setTitle(String s)
    {
        m_title = s;
    }

    public String getTitle()
    {
        return m_title;
    }

    public void setJSEventHandler(String s)
    {
        m_jsEventHandler = s;
    }

    public String getJSEventHandler()
    {
        return m_jsEventHandler;
    }

    public String getFileName()
    {
        return m_fileName;
    }

    public String getFileExtension()
    {
        return m_fileExtension;
    }

    public String getFileMimeType()
    {
        return m_mimeType;
    }

    public String getFilePhysicalPath()
    {
        return m_filePhysicalPath;
    }

    public String getFileRelativePath()
    {
        return m_fileRelativePath;
    }

    public String getFileVirtualPath()
    {
        return m_fileVirtualPath;
    }

    public String getFolderName()
    {
        return m_folderName;
    }

    public String getFolderPhysicalPath()
    {
        return m_folderPhysicalPath;
    }

    public String getFolderRelativePath()
    {
        return m_folderRelativePath;
    }

    public String getFolderVirtualPath()
    {
        return m_folderVirtualPath;
    }

    public int getRequestedAction()
    {
        return m_requestedAction;
    }

    public String getColor(String s)
    {
        return colors.getString(s);
    }

    public void setShowToolbarText(boolean flag)
    {
        m_showToolbarText = flag;
    }

    public boolean getShowToolbarText()
    {
        return m_showToolbarText;
    }

    public void setInputFileSize(int i)
    {
        m_inputFileSize = i;
    }

    public int getInputFileSize()
    {
        return m_inputFileSize;
    }

    public void setShowHiddenFiles(boolean flag)
    {
        m_showHiddenFiles = flag;
    }

    public boolean getShowHiddenFiles()
    {
        return m_showHiddenFiles;
    }

    public void setProperty(String s, boolean flag)
    {
        if(flag)
            m_properties.put(s, new Integer(1));
        else
            m_properties.put(s, new Integer(0));
    }

    public Hashtable getProperties()
    {
        return m_properties;
    }

    public boolean getProperty(String s)
    {
        Integer integer = (Integer)m_properties.get(s);
        return integer.intValue() != 0;
    }

    private boolean auth()
        throws IOException
    {
        String s = new String();
        s = m_request.getRemoteUser();
        if(s == null)
        {
            SmartFile _tmp = this;
            m_response.setStatus(401);
            ResponseWriteLn("<font size=2 face=helv,helvetica color=" + colors.getString("ERR_MSG") + "><strong>" + labels.getString("9000") + "</strong></font><br>");
            return false;
        } else
        {
            return true;
        }
    }

    private long getFolderSize(File afile[])
        throws IOException
    {
        long l = 0L;
        for(int i = 0; i < afile.length; i++)
            if(afile[i].isFile())
                l += afile[i].length();
            else
                l += getFolderSize(filterListFiles(afile[i], "*", "*"));

        return l;
    }

    public void ShowExplorer()
        throws IOException, ServletException, SmartUploadException, NoSuchMethodException
    {
        if(m_authentication && !auth())
        {
            return;
        } else
        {
            ShowExplorer("/");
            return;
        }
    }

    public void ShowExplorer(String s)
        throws IOException, ServletException, SmartUploadException, NoSuchMethodException
    {
        if(m_authentication && !auth())
        {
            return;
        } else
        {
            ShowExplorer(s, 1);
            return;
        }
    }

    public void ShowExplorer(String s, int i)
        throws IOException, ServletException, SmartUploadException, NoSuchMethodException
    {
        boolean flag = false;
        String s1 = new String();
        if(m_authentication && !auth())
            return;
        if(i == 1)
        {
            if(m_application.getRealPath(s) != null)
            {
                File file = new File(m_application.getRealPath(s));
                if(file.exists())

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -