InputStream inStream = new BufferedInputStream(fileItem.getInputStream());
List<Image> pictures = new ArrayList<Image>();
if (isArchive(inStream)) {
ArchiveFileExtractor archiveFileExtractor = new ArchiveFileExtractor(supportedImageTypes);
pictures = archiveFileExtractor.extractArchive(inStream);
} else {
// this is a picture file and not the archive file
Image picture = new Image(fileName, new Date(), inStream);
pictures.add(picture);
}