public class FileUtil
extends java.lang.Object
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
createTempFileName()
Create a new temporary file name.
|
static long |
getFileSize(java.lang.String filename)
Returns the size (in bytes) of the file corresponding to the
given filename.
|
static int |
getNumberOfPages(java.lang.String filename)
Return the number of attica pages in the file corresponding to
the given filename.
|
static void |
setNumberOfPages(java.lang.String filename,
int np) |
public static long getFileSize(java.lang.String filename) throws java.io.IOException, java.io.FileNotFoundException
filename
- the name of the file to be checked.java.io.IOException
- generic I/O exception.java.io.FileNotFoundException
- thrown whenever the file does not
exist.public static int getNumberOfPages(java.lang.String filename) throws java.io.IOException, java.io.FileNotFoundException
filename
- the name of the file to be checked.java.io.IOException
- generic I/O exception.java.io.FileNotFoundException
- thrown whenever the file does not
exist.public static void setNumberOfPages(java.lang.String filename, int np) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public static java.lang.String createTempFileName()