org.owasp.esapi.reference
Class DefaultSafeFile

java.lang.Object
  extended byjava.io.File
      extended byorg.owasp.esapi.reference.DefaultSafeFile
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class DefaultSafeFile
extends java.io.File

Extension to java.io.File to prevent against null byte injections and other unforeseen problems resulting from unprintable characters causing problems in path lookups. This does _not_ prevent against directory traversal attacks.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
DefaultSafeFile(java.io.File parent, java.lang.String child)
           
DefaultSafeFile(java.lang.String path)
           
DefaultSafeFile(java.lang.String parent, java.lang.String child)
           
DefaultSafeFile(java.net.URI uri)
           
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultSafeFile

public DefaultSafeFile(java.lang.String path)
                throws ValidationException

DefaultSafeFile

public DefaultSafeFile(java.lang.String parent,
                       java.lang.String child)
                throws ValidationException

DefaultSafeFile

public DefaultSafeFile(java.io.File parent,
                       java.lang.String child)
                throws ValidationException

DefaultSafeFile

public DefaultSafeFile(java.net.URI uri)
                throws ValidationException