public class FileUtils extends Object
Constructor and Description |
---|
FileUtils() |
Modifier and Type | Method and Description |
---|---|
static File |
inputStreamToFile(InputStream data,
String extension)
Create a temporal file with the content of data.
|
static boolean |
isValidFile(File file) |
static boolean |
isValidZipFile(File zipFile,
int minimum,
int maximum)
Check if the file is a valid Zip file and check if contains the minimum and maximum quantity of files.
|
public static boolean isValidFile(File file)
public static boolean isValidZipFile(File zipFile, int minimum, int maximum) throws VisualRecognitionException
zipFile
- The file to checkminimum
- Minimum quantity inside the zip file. Send -1 to ignore minimummaximum
- Maximum quantity inside the zip file. Send -1 to ignore maximumVisualRecognitionException
- If the the file is invalidpublic static File inputStreamToFile(InputStream data, String extension) throws IOException
data
- The content to put in the file.extension
- The Extension of the file.IOException
- If there is any problem creating the temporal file.Copyright © 2010–2017. All rights reserved.