public class FileUtil
extends java.lang.Object
| Constructor | Description |
|---|---|
FileUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
copyFileOrFolder(java.io.File source,
java.io.File dest) |
Copy file or folder.
|
static void |
copyFileOrFolder(java.io.File source,
java.io.File dest,
java.nio.file.CopyOption... options) |
Copy file or folder.
|
static void |
deleteRecursive(java.io.File f) |
Delete recursively a directory.
|
static void |
generateHTMLFromPDF(java.lang.String htmlInputFile,
java.lang.String pdfOutputFile) |
Generate HTML from PDF.
|
static void |
generateHTMLFromPDFSimple(java.lang.String htmlInputFile,
java.lang.String pdfOutputFile) |
Generate HTML from PDF simple.
|
static void |
writeSchema(java.io.File dir,
java.lang.String name,
java.lang.Class clazz) |
Write json-schema from object.
|
static void |
zipDirectory(java.lang.String pathToZip,
java.lang.String zipFile) |
Zip directory.
|
public static void deleteRecursive(java.io.File f)
throws java.lang.Exception
f - the fjava.lang.Exception - the exceptionpublic static void writeSchema(java.io.File dir,
java.lang.String name,
java.lang.Class clazz)
dir - the dirname - the nameclazz - the clazzpublic static void generateHTMLFromPDF(java.lang.String htmlInputFile,
java.lang.String pdfOutputFile)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
com.itextpdf.text.DocumentException
htmlInputFile - the html input filepdfOutputFile - the pdf output filejavax.xml.parsers.ParserConfigurationException - the parser configuration exceptionjava.io.IOException - Signals that an I/O exception has occurred.com.itextpdf.text.DocumentException - the document exceptionpublic static void generateHTMLFromPDFSimple(java.lang.String htmlInputFile,
java.lang.String pdfOutputFile)
throws javax.xml.parsers.ParserConfigurationException,
java.io.IOException,
com.itextpdf.text.DocumentException
htmlInputFile - the html input filepdfOutputFile - the pdf output filejavax.xml.parsers.ParserConfigurationException - the parser configuration exceptionjava.io.IOException - Signals that an I/O exception has occurred.com.itextpdf.text.DocumentException - the document exceptionpublic static void copyFileOrFolder(java.io.File source,
java.io.File dest)
throws java.io.IOException
source - the sourcedest - the destjava.io.IOException - Signals that an I/O exception has occurred.public static void copyFileOrFolder(java.io.File source,
java.io.File dest,
java.nio.file.CopyOption... options)
throws java.io.IOException
source - the sourcedest - the destoptions - the optionsjava.io.IOException - Signals that an I/O exception has occurred.public static void zipDirectory(java.lang.String pathToZip,
java.lang.String zipFile)
pathToZip - the path to zipzipFile - the zip file