public class IOUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
IOUtil.FileViewer
FileViewer is used to walk dir trees
|
static class |
IOUtil.FileWrapper
Wrapper for a file for doing comparisons
|
static interface |
IOUtil.UserAccountManager
UserAccountManager _more_
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
debug
debug flag
|
| Constructor and Description |
|---|
IOUtil()
Default constructor; does nothing
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
cleanFileName(java.lang.String name)
Remove illegal characters in the given filename
|
static void |
close(java.io.InputStream inputStream)
_more_
|
static void |
close(java.io.OutputStream outputStream)
_more_
|
static void |
copyFile(java.io.File from,
java.io.File to)
Copy from file to to file
|
static void |
copyFile(java.io.InputStream fis,
java.io.File to)
Copy from inputstream to to file
|
static byte[] |
createChecksum(java.lang.String filename)
_more_
|
static void |
deleteDirectory(java.io.File root)
This will recursively delete all contents under the given directory.
|
static java.util.List<java.io.File> |
deleteFiles(java.util.List<java.io.File> files)
This deletes the files in the given list.
|
static java.util.List<java.io.File> |
findFilesToScour(java.io.File dir,
double hours,
long maxBytes)
This finds and returns a list files to scour
|
static java.util.List<java.io.File> |
getDirectories(java.io.File dir,
boolean recurse)
Recursively descend (if recurse is true)
through the given directory and return a
list of all subdirectories.
|
static java.util.List<java.io.File> |
getDirectories(java.util.List dirs,
boolean recurse)
Recursively descend (if recurse is true)
through the given directories and return a
list of all subdirectories.
|
static java.lang.String |
getFileExtension(java.lang.String f)
Return the file extension from the given file (including the ".").
|
static java.lang.String |
getFileRoot(java.lang.String f)
Excise the filename from the given path and return the root.
|
static java.util.List<java.io.File> |
getFiles(java.io.File dir,
boolean recurse)
Recursively descend (if recurse is true)
through the given directory and return a
list of all files
|
static java.util.List<java.io.File> |
getFiles(java.util.List files,
java.io.File dir,
boolean recurse)
Recursively descend (if recurse is true)
through the given directory and return a
list of all files
|
static java.util.List<java.io.File> |
getFiles(java.util.List files,
java.io.File dir,
boolean recurse,
PatternFileFilter filter)
Recursively descend (if recurse is true)
through the given directory and return a
list of all files
|
static java.lang.String |
getFileTail(java.lang.String f)
Gets the file name, removing any leading directory paths.
|
static java.lang.String |
getFinalURL(java.lang.String urlStr)
Return the String contents of the final url string.
|
static java.io.InputStream |
getInputStream(java.lang.String filename)
Get an input stream for the filename
|
static java.io.InputStream |
getInputStream(java.lang.String filename,
java.lang.Class origin)
Get an input stream for the filename
|
static java.io.InputStream |
getInputStreamOLDWAY(java.lang.String filename,
java.lang.Class origin)
Get an input stream for the filename
|
static java.util.List<java.lang.String> |
getListing(java.lang.String path,
java.lang.Class c)
Lists the contents in the given file directory or java resource directory
|
static java.lang.String |
getMd5(java.lang.String path)
_more_
|
static java.lang.String |
getMD5Checksum(java.lang.String filename)
_more_
|
static java.io.File |
getMostRecentFile(java.io.File dir)
Find the youngest file in the given directory.
|
static java.io.File |
getMostRecentFile(java.io.File dir,
java.io.FileFilter filter)
Find the youngest file in the given directory that matches the given
FileFilter. |
static java.io.File |
getMostRecentFile(java.io.File dir,
javax.swing.filechooser.FileFilter filter)
Find the youngest file in the given directory that matches the given
FileFilter. |
static java.io.File[] |
getNormalFiles(java.io.File[] files)
Return an array of the file Files.
|
static java.net.URL |
getURL(java.lang.String filename,
java.lang.Class origin)
Get an input stream for the filename
|
static boolean |
hasSuffix(java.lang.String fileOrUrl,
java.lang.String suffix)
Does the given file or url have the given suffix
|
static boolean |
isADescendent(java.io.File parent,
java.io.File child)
_more_
|
static boolean |
isHtmlFile(java.lang.String filenameOrUrl)
Determine if the given filename is an html file.
|
static boolean |
isHtmlSuffix(java.lang.String url)
Does the given url end with an html suffix.
|
static boolean |
isHttpProtocol(java.lang.String url)
Is the given url an http protocol.
|
static boolean |
isImageFile(java.lang.String filename)
Determine if the given filename is an image file (e.g., ends with
.gif, .jpg, .jpeg, .png)
|
static boolean |
isRelativePath(java.lang.String path)
Is the given path relative
|
static boolean |
isTextFile(java.lang.String filename)
Determine if the given filename is a text file.
|
static boolean |
isZipFile(java.lang.String file)
_more_
|
static java.lang.String |
joinDir(java.io.File f1,
java.lang.String filename)
Return the String representation of the given filename joined to the
given directory f1.
|
static java.lang.String |
joinDir(java.lang.String f1,
java.lang.String f2)
Return the String representation of the given filename joined to the
given directory.
|
static java.lang.String |
joinDirs(java.lang.String... f)
Return the String representation of the given path separated by args.
|
static void |
main(java.lang.String[] args)
test mainp
|
static java.lang.String |
makeDir(java.io.File f)
If the directory defined in the given argument f
does not exist then make it.
|
static java.lang.String |
makeDir(java.lang.String path)
If the directory defined in the given argument path
does not exist then make it.
|
static void |
makeDirRecursive(java.io.File f)
Make the directory.
|
static double |
millisToMinutes(double millis)
_more_
|
static void |
moveFile(java.io.File from,
java.io.File to)
Move the from file to the to file
|
static void |
pruneEmptyDirectories(java.io.File root)
This will recursively prune empty subdirectories
of the given root directory.
|
static void |
pruneIfEmpty(java.io.File root)
This will recursively prune empty subdirectories
of the given root directory.
|
static byte[] |
readBytes(java.io.InputStream is)
Read in the bytes from the given InputStream
Closes the InputStream argument.
|
static byte[] |
readBytes(java.io.InputStream is,
java.lang.Object loadId)
Read in the bytes from the given InputStream
Closes the InputStream argument.
|
static byte[] |
readBytes(java.io.InputStream is,
java.lang.Object loadId,
boolean closeIt)
Read the bytes in the given input stream.
|
static byte[] |
readBytesAndCache(java.lang.String contentName,
java.lang.String cacheGroup)
See if the content is in the perma-cache.
|
static byte[] |
readBytesAndCache(java.lang.String contentName,
java.lang.String cacheGroup,
boolean unzipIfNeeded)
See if the content is in the perma-cache.
|
static java.lang.String |
readContents(java.io.File file)
Read the contents of a
File. |
static java.lang.String |
readContents(java.io.InputStream is)
Read in the bytes from the given InputStream
and construct and return a String.
|
static java.lang.String |
readContents(java.lang.String contentName)
Return the String contents of the specified contentName.
|
static java.lang.String |
readContents(java.lang.String contentName,
java.lang.Class origin)
Return the String contents of the specified contentName.
|
static java.lang.String |
readContents(java.lang.String contentName,
java.lang.Class origin,
java.lang.String dflt)
Return the String contents of the specified contentName.
|
static java.lang.String |
readContents(java.lang.String contentName,
java.lang.String dflt)
Return the String contents of the specified contentName.
|
static java.lang.String |
readContents(java.net.URL url)
_more_
|
static java.lang.String |
readInputStream(java.io.InputStream is)
Read in the bytes from the given InputStream
and construct and return a String.
|
static java.lang.Object |
readSerializedObject(java.lang.String file)
_more_
|
static void |
setUserAccountManager(IOUtil.UserAccountManager manager)
_more_
|
static java.io.File[] |
sortFilesOnAge(java.io.File[] files,
boolean youngestFirst)
Sort the given files
|
static java.io.File[] |
sortFilesOnAge(java.io.File directory,
java.io.FileFilter filter,
boolean youngestFirst)
Sort the files contained by the given directory and that (if non-null)
match the given filter.
|
static IOUtil.FileWrapper[] |
sortFilesOnAge(IOUtil.FileWrapper[] files)
_more_
|
static java.io.File[] |
sortFilesOnName(java.io.File[] files)
_more_
|
static java.io.File[] |
sortFilesOnName(java.io.File[] files,
boolean descending)
_more_
|
static java.lang.String |
stripExtension(java.lang.String f)
Remove any file extension from the given file name.
|
static void |
testio()
_more_
|
static java.io.File[] |
toFiles(java.util.List files)
Convert the toString value of the objects in the given files list
to an array of File-s
|
static void |
wait(java.io.File directory,
java.lang.String filePattern,
double sleepSeconds)
Wait until there are new files in the given directory.
|
static void |
wait(java.util.List files,
double sleepSeconds)
Wait until one or more of the files in the files list (File)
has changed.
|
static boolean |
walkDirectory(java.io.File dir,
IOUtil.FileViewer fileViewer)
Walk the dir tree with the given file viewer
|
static boolean |
walkDirectory(java.io.File dir,
IOUtil.FileViewer fileViewer,
int level)
Walk the dir tree with the given file viewer
|
static java.io.FileFilter |
wrapFilter(javax.swing.filechooser.FileFilter filter)
Create a javaio FileFilter from the filechooser package file filter.
|
static void |
write(java.io.OutputStream to,
java.lang.String s)
Write the bytes held by the iven string to the outputstream
|
static void |
writeBytes(java.io.File filename,
byte[] contents)
Write out a file to the
File specified. |
static void |
writeFile(java.io.File filename,
java.lang.String contents)
Write out a file to the
File specified. |
static void |
writeFile(java.lang.String filename,
java.lang.String contents)
Write out a file to the filename specified.
|
static void |
writeJarFile(java.lang.String filename,
java.util.List files)
Write out the list of files to the jar file specified by filename
|
static void |
writeJarFile(java.lang.String filename,
java.util.List files,
java.lang.String pathPrefix)
Write out the list of files to the jar file specified by filename
|
static void |
writeJarFile(java.lang.String filename,
java.util.List files,
java.lang.String pathPrefix,
boolean makeFilesUnique)
Write out the list of files to the jar file specified by filename
|
static void |
writeSerializedObject(java.lang.String file,
java.lang.Object o)
_more_
|
static long |
writeTo(java.io.InputStream from,
java.io.OutputStream to)
Copy the input stream to the output stream
|
static long |
writeTo(java.io.InputStream from,
java.io.OutputStream to,
java.lang.Object loadId,
long length)
Copy the input stream to the output stream
|
static java.util.List |
writeTo(java.util.List urls,
java.lang.String prefix,
java.util.List suffixes,
java.lang.Object loadId)
_more_
|
static java.util.List |
writeTo(java.util.List urls,
java.lang.String prefix,
java.lang.String suffix)
Copy the files pointed to by the urls list to the directory/file pointed to by prefx.
|
static java.util.List |
writeTo(java.util.List urls,
java.lang.String prefix,
java.lang.String suffix,
java.lang.Object loadId)
Copy the files pointed to by the urls list to the directory/file pointed to by prefx.
|
static long |
writeTo(java.net.URL from,
java.io.File file,
java.lang.Object loadId)
Write to the file from the URL stream
|
public static boolean hasSuffix(java.lang.String fileOrUrl,
java.lang.String suffix)
fileOrUrl - The name of the file or urlsuffix - The suffixpublic static java.io.File getMostRecentFile(java.io.File dir)
dir - The directory to search in.public static java.io.File getMostRecentFile(java.io.File dir,
java.io.FileFilter filter)
FileFilter.dir - The directory to search in.filter - The FileFilter to be used to limit what files we look at (may be null).public static java.io.File[] sortFilesOnAge(java.io.File directory,
java.io.FileFilter filter,
boolean youngestFirst)
directory - The directoryfilter - The filteryoungestFirst - Ascending or descendingpublic static java.io.File[] getNormalFiles(java.io.File[] files)
files - Array of filespublic static java.io.File[] sortFilesOnAge(java.io.File[] files,
boolean youngestFirst)
files - The filesyoungestFirst - Ascending or descendingpublic static IOUtil.FileWrapper[] sortFilesOnAge(IOUtil.FileWrapper[] files)
files - _more_public static java.util.List<java.io.File> deleteFiles(java.util.List<java.io.File> files)
files - The files to deletepublic static java.util.List<java.io.File> findFilesToScour(java.io.File dir,
double hours,
long maxBytes)
dir - _more_hours - _more_maxBytes - _more_public static double millisToMinutes(double millis)
millis - _more_public static java.io.File[] sortFilesOnName(java.io.File[] files)
files - _more_public static java.io.File[] sortFilesOnName(java.io.File[] files,
boolean descending)
files - _more_descending - _more_public static java.io.File[] toFiles(java.util.List files)
files - List of filespublic static java.io.FileFilter wrapFilter(javax.swing.filechooser.FileFilter filter)
filter - The filechooser file filterpublic static java.io.File getMostRecentFile(java.io.File dir,
javax.swing.filechooser.FileFilter filter)
FileFilter.dir - The directory to search in.filter - The filter to be used to limit what files we look at (may be null).public static long writeTo(java.io.InputStream from,
java.io.OutputStream to)
throws java.io.IOException
from - input streamto - outputjava.io.IOException - On badnesspublic static void write(java.io.OutputStream to,
java.lang.String s)
throws java.lang.Exception
to - stream to write tos - string to writejava.lang.Exception - on badnesspublic static java.lang.String readContents(java.net.URL url)
throws java.lang.Exception
url - _more_java.lang.Exception - _more_public static long writeTo(java.net.URL from,
java.io.File file,
java.lang.Object loadId)
throws java.io.IOException
from - URL for inputfile - file for outputloadId - A JobManager loadId that, if set, can be used to
stop the loadjava.io.IOException - problem writing to file.public static long writeTo(java.io.InputStream from,
java.io.OutputStream to,
java.lang.Object loadId,
long length)
throws java.io.IOException
from - input streamto - outputloadId - A JobManager loadId that, if set, can be used to
stop the loadlength - number of bytes to writejava.io.IOException - On badnesspublic static java.util.List writeTo(java.util.List urls,
java.lang.String prefix,
java.lang.String suffix)
throws java.io.IOException
urls - List of urls to copyprefix - file directory prefixsuffix - suffixjava.io.IOException - On badnesspublic static java.util.List writeTo(java.util.List urls,
java.lang.String prefix,
java.lang.String suffix,
java.lang.Object loadId)
throws java.io.IOException
urls - List of urls to copyprefix - file directory prefixsuffix - suffixloadId - JobManager loadIdjava.io.IOException - On badnesspublic static java.util.List writeTo(java.util.List urls,
java.lang.String prefix,
java.util.List suffixes,
java.lang.Object loadId)
throws java.io.IOException
urls - _more_prefix - _more_suffixes - _more_loadId - _more_java.io.IOException - _more_public static java.util.List<java.lang.String> getListing(java.lang.String path,
java.lang.Class c)
path - may be a file directory path or a java resource directoryc - base class to use if its java resourcespublic static java.lang.String getFileTail(java.lang.String f)
f - The file path.public static java.lang.String getFileRoot(java.lang.String f)
f - The file path.public static java.lang.String stripExtension(java.lang.String f)
f - The file path.public static java.lang.String cleanFileName(java.lang.String name)
name - The filename to be cleaned uppublic static java.lang.String getFileExtension(java.lang.String f)
f - The file path.public static void writeFile(java.lang.String filename,
java.lang.String contents)
throws java.io.FileNotFoundException,
java.io.IOException
filename - filename to write tocontents - file contentsjava.io.FileNotFoundException - if the file does not existjava.io.IOException - if there is a problem writingpublic static void writeFile(java.io.File filename,
java.lang.String contents)
throws java.io.FileNotFoundException,
java.io.IOException
File specified.filename - File to write tocontents - file contentsjava.io.FileNotFoundException - if the file does not existjava.io.IOException - if there is a problem writingpublic static void writeBytes(java.io.File filename,
byte[] contents)
throws java.io.FileNotFoundException,
java.io.IOException
File specified.filename - File to write tocontents - file contentsjava.io.FileNotFoundException - if the file does not existjava.io.IOException - if there is a problem writingpublic static void moveFile(java.io.File from,
java.io.File to)
throws java.io.FileNotFoundException,
java.io.IOException
from - File to moveto - The destinationjava.io.FileNotFoundException - When we cannot find the filejava.io.IOException - When something untoward happenspublic static void copyFile(java.io.File from,
java.io.File to)
throws java.io.FileNotFoundException,
java.io.IOException
from - File to copyto - The destinationjava.io.FileNotFoundException - When we cannot find the filejava.io.IOException - When something untoward happenspublic static void copyFile(java.io.InputStream fis,
java.io.File to)
throws java.io.FileNotFoundException,
java.io.IOException
fis - sourceto - The destinationjava.io.FileNotFoundException - When we cannot find the filejava.io.IOException - When something untoward happenspublic static boolean isTextFile(java.lang.String filename)
filename - The filename to check.public static boolean isImageFile(java.lang.String filename)
filename - The filename to check.public static boolean isHtmlFile(java.lang.String filenameOrUrl)
filenameOrUrl - The filename to check.public static boolean isHtmlSuffix(java.lang.String url)
url - The urlpublic static boolean isHttpProtocol(java.lang.String url)
url - The urlpublic static java.io.InputStream getInputStream(java.lang.String filename)
throws java.io.FileNotFoundException,
java.io.IOException
filename - name of filejava.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem opening streampublic static java.io.InputStream getInputStream(java.lang.String filename,
java.lang.Class origin)
throws java.io.FileNotFoundException,
java.io.IOException
filename - name of fileorigin - relative origin point for file locationjava.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem opening streampublic static void setUserAccountManager(IOUtil.UserAccountManager manager)
manager - _more_public static java.io.InputStream getInputStreamOLDWAY(java.lang.String filename,
java.lang.Class origin)
throws java.io.FileNotFoundException,
java.io.IOException
filename - name of fileorigin - relative origin point for file locationjava.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem opening streampublic static java.net.URL getURL(java.lang.String filename,
java.lang.Class origin)
throws java.io.FileNotFoundException,
java.io.IOException
filename - name of fileorigin - relative origin point for file locationjava.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem opening streampublic static java.lang.String readContents(java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
File. Used for reading text type
files (XML, HTML, etc)file - file to read.java.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem opening streampublic static boolean isADescendent(java.io.File parent,
java.io.File child)
parent - _more_child - _more_public static java.lang.String readContents(java.lang.String contentName,
java.lang.String dflt)
contentName - URL or filenamedflt - default to return if a problempublic static java.lang.String readContents(java.lang.String contentName,
java.lang.Class origin,
java.lang.String dflt)
contentName - URL or filenameorigin - origin classdflt - default to return if a problempublic static java.lang.String readContents(java.lang.String contentName)
throws java.io.FileNotFoundException,
java.io.IOException
contentName - can either be a URL, a filename or a resource.null if there is a problem.java.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem reading contentspublic static boolean isRelativePath(java.lang.String path)
path - file pathpublic static java.lang.String readContents(java.lang.String contentName,
java.lang.Class origin)
throws java.io.FileNotFoundException,
java.io.IOException
contentName - can either be a URL, a filename or a resource.origin - relative origin for path to filenull if there is a problem.java.io.FileNotFoundException - couldn't find the filejava.io.IOException - problem reading contentspublic static java.lang.String getFinalURL(java.lang.String urlStr)
urlStr - can be a URL .null if there is a problem.public static byte[] readBytesAndCache(java.lang.String contentName,
java.lang.String cacheGroup)
throws java.io.FileNotFoundException,
java.io.IOException
contentName - url or filenamecacheGroup - Cache groupjava.io.FileNotFoundException - On badnessjava.io.IOException - On badnesspublic static boolean isZipFile(java.lang.String file)
file - _more_public static byte[] readBytesAndCache(java.lang.String contentName,
java.lang.String cacheGroup,
boolean unzipIfNeeded)
throws java.io.FileNotFoundException,
java.io.IOException
contentName - url or filenamecacheGroup - Cache groupunzipIfNeeded - IF true and if the url is a zip file then unzip itjava.io.FileNotFoundException - On badnessjava.io.IOException - On badnesspublic static java.lang.String readContents(java.io.InputStream is)
throws java.io.IOException
is - InputStream to read fromjava.io.IOException - problem reading contentspublic static java.lang.String readInputStream(java.io.InputStream is)
throws java.io.IOException
is - InputStream to read fromjava.io.IOException - problem reading contentspublic static byte[] readBytes(java.io.InputStream is)
throws java.io.IOException
is - InputStream to read fromjava.io.IOException - problem reading contentspublic static byte[] readBytes(java.io.InputStream is,
java.lang.Object loadId)
throws java.io.IOException
is - InputStream to read fromloadId - Job manager load idjava.io.IOException - problem reading contentspublic static void close(java.io.InputStream inputStream)
inputStream - _more_public static void close(java.io.OutputStream outputStream)
outputStream - _more_public static byte[] readBytes(java.io.InputStream is,
java.lang.Object loadId,
boolean closeIt)
throws java.io.IOException
is - The input streamloadId - If non-null check with the JobManager if we should continuecloseIt - If true then close the input streamjava.io.IOException - On badnesspublic static java.lang.String joinDir(java.lang.String f1,
java.lang.String f2)
f1 - directory pathf2 - filenamepublic static java.lang.String joinDir(java.io.File f1,
java.lang.String filename)
f1 - directory pathfilename - filenamepublic static java.lang.String joinDirs(java.lang.String... f)
f - directory path varargpublic static java.lang.String makeDir(java.lang.String path)
path - directory to makepublic static java.lang.String makeDir(java.io.File f)
f - directory as a filepublic static final void makeDirRecursive(java.io.File f)
f - directory to makepublic static java.util.List<java.io.File> getFiles(java.io.File dir,
boolean recurse)
dir - The directory to look atrecurse - Do we recursepublic static java.util.List<java.io.File> getFiles(java.util.List files,
java.io.File dir,
boolean recurse)
files - The list of files to add todir - The directory to look atrecurse - Do we recursepublic static java.util.List<java.io.File> getFiles(java.util.List files,
java.io.File dir,
boolean recurse,
PatternFileFilter filter)
files - The list of files to add todir - The directory to look atrecurse - Do we recursefilter - If non-null then use this to find filespublic static boolean walkDirectory(java.io.File dir,
IOUtil.FileViewer fileViewer)
throws java.lang.Exception
dir - dirfileViewer - viewerjava.lang.Exception - on badness_public static boolean walkDirectory(java.io.File dir,
IOUtil.FileViewer fileViewer,
int level)
throws java.lang.Exception
dir - dirfileViewer - viewerlevel - tree depthjava.lang.Exception - on badness_public static java.util.List<java.io.File> getDirectories(java.io.File dir,
boolean recurse)
dir - The directory to look atrecurse - Do we recursepublic static java.util.List<java.io.File> getDirectories(java.util.List dirs,
boolean recurse)
dirs - List of directories to look atrecurse - Do we recursepublic static void pruneIfEmpty(java.io.File root)
root - Directory to prunepublic static void pruneEmptyDirectories(java.io.File root)
root - Directory to prunepublic static void deleteDirectory(java.io.File root)
root - Directory to deletepublic static void wait(java.io.File directory,
java.lang.String filePattern,
double sleepSeconds)
directory - The directoryfilePattern - The patternsleepSeconds - Sleep this number of seconds between each checkpublic static void wait(java.util.List files,
double sleepSeconds)
files - List of File-ssleepSeconds - Seconds to sleep between checks.public static java.lang.Object readSerializedObject(java.lang.String file)
throws java.lang.Exception
file - _more_java.lang.Exception - _more_public static void writeSerializedObject(java.lang.String file,
java.lang.Object o)
throws java.lang.Exception
file - _more_o - _more_java.lang.Exception - _more_public static void testio()
throws java.lang.Exception
java.lang.Exception - _more_public static void main(java.lang.String[] args)
throws java.lang.Exception
args - cmd line argsjava.lang.Exception - On badnesspublic static void writeJarFile(java.lang.String filename,
java.util.List files)
throws java.io.IOException
filename - jar file namefiles - list of filesjava.io.IOException - On badnesspublic static void writeJarFile(java.lang.String filename,
java.util.List files,
java.lang.String pathPrefix)
throws java.io.IOException
filename - jar file namefiles - list of filespathPrefix - If not null this is the prefx we add to the jar entryjava.io.IOException - On badnesspublic static void writeJarFile(java.lang.String filename,
java.util.List files,
java.lang.String pathPrefix,
boolean makeFilesUnique)
throws java.io.IOException
filename - jar file namefiles - list of filespathPrefix - If not null this is the prefx we add to the jar entrymakeFilesUnique - If true then make all of the file names unique in case of conflictjava.io.IOException - On badnesspublic static byte[] createChecksum(java.lang.String filename)
throws java.lang.Exception
filename - _more_java.lang.Exception - _more_public static java.lang.String getMD5Checksum(java.lang.String filename)
throws java.lang.Exception
filename - _more_java.lang.Exception - _more_public static java.lang.String getMd5(java.lang.String path)
throws java.lang.Exception
path - _more_java.lang.Exception - _more_