com.genexus.webpanels.FileItemCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxclassR Show documentation
Show all versions of gxclassR Show documentation
Core classes for the runtime used by Java and Android apps generated with GeneXus
package com.genexus.webpanels;
import java.io.InputStream;
import java.util.Vector;
import com.genexus.PrivateUtilities;
import com.genexus.fileupload.IFileItemIterator;
import com.genexus.fileupload.IFileItemStream;
import com.genexus.specific.java.FileUtils;
public class FileItemCollection
{
protected Vector vector;
public FileItemCollection( IFileItemIterator lstParts, String rootPath)
{
vector = new Vector();
if (lstParts != null)
{
try
{
while (lstParts.hasNext())
{
IFileItemStream item = lstParts.next();
String formFieldNameWithExtension = item.getName();
String temporalFilePath = item.getName();
if (!item.isFormField())
{
temporalFilePath = rootPath + com.genexus.PrivateUtilities.getTempFileName("tmp");
}
InputStream stream = item.openStream();
FileItem fileItem = new FileItem(formFieldNameWithExtension, temporalFilePath, item.isFormField(), item.getFieldName(), stream);
vector.add(fileItem);
}
}
catch(Exception ex)
{
}
}
}
public int getCount()
{
return vector.size();
}
public void clear()
{
vector.clear();
}
public boolean hasitembyname( String name)
{
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy