public final class FileUtil extends Object
public static String getFontsDir()
public static boolean fileExists(String path)
public static boolean directoryExists(String path)
public static File[] listFilesInDirectoryByFilter(String outPath, FileFilter fileFilter)
public static PrintWriter createPrintWriter(OutputStream output, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static OutputStream getBufferedOutputStream(String filename) throws FileNotFoundException
FileNotFoundExceptionpublic static OutputStream wrapWithBufferedOutputStream(OutputStream outputStream)
public static File createTempFile(String path) throws IOException
IOExceptionpublic static FileOutputStream getFileOutputStream(File tempFile) throws FileNotFoundException
FileNotFoundExceptionpublic static RandomAccessFile getRandomAccessFile(File tempFile) throws FileNotFoundException
FileNotFoundExceptionpublic static void createDirectories(String outPath)
@Deprecated public static String getParentDirectory(String file)
public static String getParentDirectory(File file) throws MalformedURLException
MalformedURLExceptionpublic static boolean deleteFile(File file)
public static String parentDirectory(URL url) throws URISyntaxException
url - of resourceURISyntaxExceptionCopyright © 1998–2019 iText Group NV. All rights reserved.