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;
    }
}
