|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.ece.iacl.jist.utility.FileUtil
public class FileUtil
The Class FileUtil.
Field Summary | |
---|---|
static int |
COMPRESSION_GZIP
The Constant COMPRESSION_GZIP. |
static int |
COMPRESSION_NONE
The Constant COMPRESSION_NONE. |
static int |
COMPRESSION_ZIP
The Constant COMPRESSION_ZIP. |
Constructor Summary | |
---|---|
FileUtil()
|
Method Summary | |
---|---|
static java.lang.String |
forceSafeFilename(java.lang.String filenameNoPath)
Replace any potentially unsafe file system characters with "_". |
static java.lang.String |
recoverUnsafeFilename(java.lang.String filenameNoPath)
Recover unsafe filename. |
static java.io.PrintStream[] |
redirect(java.io.File fout,
java.io.File ferr)
Redirect stdout and stderr to files. |
static void |
restoreRedirect()
|
static void |
setModelImageCompression(ModelImage resultImage,
int compressionType)
Sets the model image compression. |
static void |
updateFileInfo(FileInfoBase info,
ModelImage resultImage)
Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source). |
static void |
updateFileInfo(ModelImage image,
ModelImage resultImage)
Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int COMPRESSION_GZIP
public static final int COMPRESSION_ZIP
public static final int COMPRESSION_NONE
Constructor Detail |
---|
public FileUtil()
Method Detail |
---|
public static java.io.PrintStream[] redirect(java.io.File fout, java.io.File ferr)
fout
- file for stdoutferr
- file for stderr
public static void restoreRedirect()
public static final void updateFileInfo(ModelImage image, ModelImage resultImage)
image
- the imageresultImage
- the result imagepublic static final void setModelImageCompression(ModelImage resultImage, int compressionType)
resultImage
- the result imagecompressionType
- the compression typepublic static final void updateFileInfo(FileInfoBase info, ModelImage resultImage)
info
- the inforesultImage
- the result imagepublic static java.lang.String forceSafeFilename(java.lang.String filenameNoPath)
filenameNoPath
- the filename no path
public static java.lang.String recoverUnsafeFilename(java.lang.String filenameNoPath)
filenameNoPath
- the filename no path
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |