public class FileUtil extends Object
| Constructor and Description |
|---|
FileUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createTempFile(String filename,
InputStream is)
Creates temporary file in a temporary directory under user.home dir.
|
static String |
getPrefix(String filename)
Gets prefix for the filename.
|
static void |
main(String[] args)
Main method for debugging purpose only.
|
static void |
writeListAsStr(String file,
List list)
Writes String representation of the elements in the list in to the file.
|
public static void writeListAsStr(String file, List list) throws IOException
file - the File in which writelist - the list containing the elements to be writtenIOException - If anything wrong with File operationspublic static String getPrefix(String filename)
filename - the Name of the filepublic static String createTempFile(String filename, InputStream is) throws IOException
filename - the Name of the temp file to be createdis - the InputStream which is read to put the file contentIOException - If temporary file cannot be created for any reasonpublic static void main(String[] args)
Copyright © 2021. All rights reserved.