files.java
来自「一些jsp源代码 可以帮助初学者更容易上手」· Java 代码 · 共 52 行
JAVA
52 行
package upload;
import java.util.Hashtable;
// Referenced classes of package:
// 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 + -
显示快捷键?