files.java

来自「免费的 多个jsp上传组件。在jsp页面中调用使用」· Java 代码 · 共 57 行

JAVA
57
字号
// 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:   files.java

package xiaoxiang.fileUpload;

import java.util.Hashtable;

// Referenced classes of package xiaoxiang.fileUpload:
//            file

public class files
{

    private Hashtable hFiles;
    private long totalSize;
    private int count;

    protected files()
    {
        hFiles = new Hashtable();
        count = 0;
        totalSize = 0L;
    }

    protected void addFile(file pFile)
    {
        hFiles.put(new Integer(count), pFile);
        count++;
        totalSize += pFile.getSize();
    }

    public file getFile(int pCount)
        throws Exception
    {
        if(pCount >= count || pCount <= -1)
        {
            throw new Exception("参数错误");
        } else
        {
            file tempFile = (file)hFiles.get(new Integer(pCount));
            return tempFile;
        }
    }

    public int getCount()
    {
        return count;
    }

    public long getSize()
    {
        return totalSize;
    }
}

⌨️ 快捷键说明

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