com.isenshi.util
クラス ResourceUtils
java.lang.Object
com.isenshi.util.ResourceUtils
- public class ResourceUtils
- extends Object
クラス 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.