net.sf.sqs_xml.util
Class FileUtil

java.lang.Object
  extended bynet.sf.sqs_xml.util.FileUtil

public class FileUtil
extends java.lang.Object


Constructor Summary
FileUtil()
           
 
Method Summary
static void clearDirectory(java.lang.String absolutePath)
           
static boolean copy(java.io.File from, java.io.File to, java.lang.String encoding)
           
static void createDirectory(java.lang.String absolutePath)
           
static java.io.PrintWriter createPrintWriter(java.io.File file, java.lang.String encoding)
           
static java.io.PrintWriter createPrintWriter(java.io.OutputStream stream, java.lang.String encoding)
           
static java.io.Reader createReader(java.io.InputStream input, java.lang.String encoding)
           
static java.util.List find(java.io.File path, java.io.FileFilter filter)
           
static java.util.List find(java.io.File absolutePath, java.lang.String suffix)
           
static java.util.List find(java.lang.String absolutePath, java.lang.String suffix)
           
static java.lang.String getBasename(java.io.File file)
           
static java.lang.String getBasename(java.lang.String filename)
           
static java.lang.String getSuffix(java.io.File filename)
           
static java.lang.String getSuffix(java.lang.String filename)
           
static java.lang.String getSuffixReplacedFilePath(java.io.File file, java.lang.String suffix)
           
static void keywordSubstitution(java.io.File file, java.lang.String from, java.lang.String to)
           
static boolean keywordSubstitution(java.io.File file, java.lang.String from, java.lang.String to, java.lang.String encoding)
           
static boolean keywordSubstitution(java.io.InputStream inputStream, java.io.OutputStream outputStream, java.lang.String from, java.lang.String to, java.lang.String encoding)
           
static java.net.URL toURL(java.io.File tgtFile)
           
static java.lang.String toURLString(java.io.File tgtFile)
           
static java.lang.String toURLString(java.lang.String tgtFilePath)
           
static void writeImageFile(java.io.File imageFile, java.awt.image.BufferedImage bufferedImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

toURL

public static java.net.URL toURL(java.io.File tgtFile)
                          throws java.io.UnsupportedEncodingException,
                                 java.net.MalformedURLException,
                                 java.io.IOException
Throws:
java.io.UnsupportedEncodingException
java.net.MalformedURLException
java.io.IOException

toURLString

public static java.lang.String toURLString(java.io.File tgtFile)
                                    throws java.io.UnsupportedEncodingException,
                                           java.io.IOException
Throws:
java.io.UnsupportedEncodingException
java.io.IOException

toURLString

public static java.lang.String toURLString(java.lang.String tgtFilePath)
                                    throws java.io.UnsupportedEncodingException,
                                           java.io.IOException
Throws:
java.io.UnsupportedEncodingException
java.io.IOException

createDirectory

public static void createDirectory(java.lang.String absolutePath)

clearDirectory

public static void clearDirectory(java.lang.String absolutePath)

find

public static java.util.List find(java.lang.String absolutePath,
                                  java.lang.String suffix)

find

public static java.util.List find(java.io.File absolutePath,
                                  java.lang.String suffix)

find

public static java.util.List find(java.io.File path,
                                  java.io.FileFilter filter)

keywordSubstitution

public static void keywordSubstitution(java.io.File file,
                                       java.lang.String from,
                                       java.lang.String to)

keywordSubstitution

public static boolean keywordSubstitution(java.io.File file,
                                          java.lang.String from,
                                          java.lang.String to,
                                          java.lang.String encoding)

keywordSubstitution

public static boolean keywordSubstitution(java.io.InputStream inputStream,
                                          java.io.OutputStream outputStream,
                                          java.lang.String from,
                                          java.lang.String to,
                                          java.lang.String encoding)

copy

public static boolean copy(java.io.File from,
                           java.io.File to,
                           java.lang.String encoding)

getSuffix

public static java.lang.String getSuffix(java.io.File filename)

getSuffix

public static java.lang.String getSuffix(java.lang.String filename)

getBasename

public static java.lang.String getBasename(java.io.File file)

getBasename

public static java.lang.String getBasename(java.lang.String filename)

getSuffixReplacedFilePath

public static java.lang.String getSuffixReplacedFilePath(java.io.File file,
                                                         java.lang.String suffix)

writeImageFile

public static void writeImageFile(java.io.File imageFile,
                                  java.awt.image.BufferedImage bufferedImage)
                           throws java.io.FileNotFoundException,
                                  java.io.IOException
Throws:
java.io.FileNotFoundException
java.io.IOException

createPrintWriter

public static java.io.PrintWriter createPrintWriter(java.io.OutputStream stream,
                                                    java.lang.String encoding)
                                             throws java.io.IOException
Throws:
java.io.IOException

createPrintWriter

public static java.io.PrintWriter createPrintWriter(java.io.File file,
                                                    java.lang.String encoding)
                                             throws java.io.IOException
Throws:
java.io.IOException

createReader

public static java.io.Reader createReader(java.io.InputStream input,
                                          java.lang.String encoding)
                                   throws java.io.IOException
Throws:
java.io.IOException