com.isenshi.util
クラス ResourceUtils

java.lang.Object
  拡張com.isenshi.util.ResourceUtils

public class ResourceUtils
extends Object


コンストラクタの概要
ResourceUtils()
           
 
メソッドの概要
static void checkNewParent(File file)
           
static void copyFile(String srcpath, String destpath)
           
static boolean createDirectory(File file)
           
static boolean createDirectory(String filepath)
           
static void deleteDirectory(File file)
           
static void deleteDirectory(String path)
           
static String[] getChilrenNames(String path)
           
static ClassLoader getClassLoader()
           
static File getFile(String path)
           
static String getFileName(URL url)
           
static InputStream getInputStream(String path)
           
static OutputStream getOutputStream(String path)
           
static String getPath(String path)
           
static InputStream getResourceAsStream(String path)
           
static File getUpwardFileByName(String name)
          Provides File object with the given name which exists on upward path to the directory the current thread resides.
static Writer getWriter(String path)
           
static boolean isExist(String path)
           
static String readContent(String path)
           
static void readJar(JarInputStream jinput, String directory)
           
static void removeContent(String path)
           
static void writeContent(String path, String content)
           
static void writeFile(String outputPath, InputStream is)
           
static void writeJar(JarOutputStream os, String directory)
           
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

ResourceUtils

public ResourceUtils()
メソッドの詳細

writeJar

public static final void writeJar(JarOutputStream os,
                                  String directory)

readJar

public static final void readJar(JarInputStream jinput,
                                 String directory)

deleteDirectory

public static final void deleteDirectory(String path)

deleteDirectory

public static final void deleteDirectory(File file)

getChilrenNames

public static final String[] getChilrenNames(String path)

getWriter

public static Writer getWriter(String path)

getInputStream

public static InputStream getInputStream(String path)

isExist

public static boolean isExist(String path)

getOutputStream

public static OutputStream getOutputStream(String path)

checkNewParent

public static void checkNewParent(File file)

getPath

public static String getPath(String path)

getFile

public static File getFile(String path)

getResourceAsStream

public static InputStream getResourceAsStream(String path)

getClassLoader

public static ClassLoader getClassLoader()

getFileName

public static String getFileName(URL url)

writeContent

public static void writeContent(String path,
                                String content)

readContent

public static String readContent(String path)

removeContent

public static void removeContent(String path)

getUpwardFileByName

public static final File getUpwardFileByName(String name)
Provides File object with the given name which exists on upward path to the directory the current thread resides. This returns the first object with the given name, for example, the name is "foo", and current thread directory "/home/foo/xxx/foo/classes", returns "/home/foo/xxx/foo". FIXME: want to use FileUtils wild card, needs commons.io update.

パラメータ:
name - specifies the file or directory name
戻り値:
file object if the given name exists, if not return null

createDirectory

public static boolean createDirectory(String filepath)

createDirectory

public static boolean createDirectory(File file)

copyFile

public static void copyFile(String srcpath,
                            String destpath)
                     throws IOException
例外:
IOException

writeFile

public static void writeFile(String outputPath,
                             InputStream is)
                      throws IOException
例外:
IOException


Copyright © 2005-2006 The Seasar Foundation and the others.. All Rights Reserved.