public class SafeFile
extends java.io.File
| Modifier and Type | Field and Description |
|---|---|
private static java.util.regex.Pattern |
DIR_BLACKLIST_PAT |
private static java.util.regex.Pattern |
FILE_BLACKLIST_PAT |
private static java.util.regex.Pattern |
PERCENTS_PAT |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
SafeFile(java.io.File parent,
java.lang.String child) |
SafeFile(java.lang.String path) |
SafeFile(java.lang.String parent,
java.lang.String child) |
SafeFile(java.net.URI uri) |
| Modifier and Type | Method and Description |
|---|---|
private int |
containsUnprintableCharacters(java.lang.String s) |
private void |
doDirCheck(java.lang.String path) |
private void |
doFileCheck(java.lang.String path) |
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toPath, toString, toURI, toURLprivate static final long serialVersionUID
private static final java.util.regex.Pattern PERCENTS_PAT
private static final java.util.regex.Pattern FILE_BLACKLIST_PAT
private static final java.util.regex.Pattern DIR_BLACKLIST_PAT
public SafeFile(java.lang.String path)
throws ValidationException
ValidationExceptionpublic SafeFile(java.lang.String parent,
java.lang.String child)
throws ValidationException
ValidationExceptionpublic SafeFile(java.io.File parent,
java.lang.String child)
throws ValidationException
ValidationExceptionpublic SafeFile(java.net.URI uri)
throws ValidationException
ValidationExceptionprivate void doDirCheck(java.lang.String path)
throws ValidationException
ValidationExceptionprivate void doFileCheck(java.lang.String path)
throws ValidationException
ValidationExceptionprivate int containsUnprintableCharacters(java.lang.String s)