|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vividsolutions.jump.util.FileUtil
public class FileUtil
File-related utility functions.
| Constructor Summary | |
|---|---|
FileUtil()
|
|
| Method Summary | |
|---|---|
static java.io.File |
addExtensionIfNone(java.io.File file,
java.lang.String extension)
|
static java.util.List |
getContents(java.io.InputStream inputStream)
|
static java.util.List |
getContents(java.lang.String textFileName)
Reads a text file. |
static java.lang.String |
getExtension(java.io.File f)
|
static void |
setContents(java.lang.String textFileName,
java.util.List lines)
Saves the List of Strings to a file with the given filename. |
static void |
setContents(java.lang.String textFileName,
java.lang.String contents)
Saves the String to a file with the given filename. |
static void |
zip(java.util.Collection files,
java.io.File zipFile)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileUtil()
| Method Detail |
|---|
public static java.util.List getContents(java.lang.String textFileName)
throws java.io.FileNotFoundException,
java.io.IOException
textFileName - the pathname of the file to open
java.io.FileNotFoundException - if the text file is not found
java.io.IOException - if the file is not found or another I/O error occurs
public static void setContents(java.lang.String textFileName,
java.lang.String contents)
throws java.io.IOException
textFileName - the pathname of the file to create (or overwrite)contents - the data to save
java.io.IOException - if an I/O error occurs.
public static java.util.List getContents(java.io.InputStream inputStream)
throws java.io.IOException
java.io.IOException
public static void setContents(java.lang.String textFileName,
java.util.List lines)
throws java.io.IOException
textFileName - the pathname of the file to create (or overwrite)lines - the Strings to save as lines in the file
java.io.IOException - if an I/O error occurs.
public static void zip(java.util.Collection files,
java.io.File zipFile)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getExtension(java.io.File f)
public static java.io.File addExtensionIfNone(java.io.File file,
java.lang.String extension)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||