src/com/util/SmartFile.java

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.util;
import java.io.ByteArrayInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.servlet.ServletException;

public class SmartFile
{
    private SmartUpload m_parent;
    private int m_startData;
    private int m_endData;
    private int m_size;
    private String m_fieldname;
    private String m_filename;
    private String m_fileExt;
    private String m_filePathName;
    private String m_contentType;
    private String m_contentDisp;
    private String m_typeMime;
    private String m_subTypeMime;
    //private String m_contentString;
    private boolean m_isMissing;
    public static final int SAVEAS_AUTO = 0;
    public static final int SAVEAS_VIRTUAL = 1;
    public static final int SAVEAS_PHYSICAL = 2;

    SmartFile()
    {
        m_startData = 0;
        m_endData = 0;
        m_size = 0;
        m_fieldname = "";//new String("");
        m_filename = "";//new String();
        m_fileExt = "";//new String();
        m_filePathName = "";//new String("");
        m_contentType = "";//new String();
        m_contentDisp = "";//new String();
        m_typeMime = "";//new String();
        m_subTypeMime = "";//new String();
        //m_contentString = "";//new String();
        m_isMissing = true;
    }

    public void saveAs(String s) throws IOException,SmartUploadException
    {
        saveAs(s,0);
    }

    public void saveAs(String s,int i) throws IOException,SmartUploadException
    {
        //Method invokes dubious new String() constructor; just use ""
        //Creating a new java.lang.String object using the no-argument constructor wastes memory because the object so created will be functionally indistinguishable from the empty string constant "".\u00A0 Java guarantees that identical string constants will be represented by the same String object.\u00A0 Therefore, you should just use the empty string constant directly.
        //String s1 = new String();
        String s1 = "";
        s1 = m_parent.getPhysicalPath(s,i);
        if(s1 == null)
        {
后面还有 208 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。