Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR 217 (Maintenance Release)

Uses of Class
java.io.File

Packages that use File
java.io Provides for system input and output through data streams, serialization and the file system. 
java.lang Provides classes that are fundamental to the design of the Java programming language. 
java.util.jar Provides classes for reading and writing the JAR (Java ARchive) file format, which is based on the standard ZIP file format with an optional manifest file. 
java.util.zip Provides classes for reading and writing the standard ZIP and GZIP file formats. 
 

Uses of File in java.io
 

Methods in java.io that return File
 File File.getParentFile()
          Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not name a parent directory.
 File File.getAbsoluteFile()
          Returns the absolute form of this abstract pathname.
 File File.getCanonicalFile()
          Returns the canonical form of this abstract pathname.
 File[] File.listFiles()
          Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
 File[] File.listFiles(FilenameFilter filter)
          Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
 File[] File.listFiles(FileFilter filter)
          Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter.
static File[] File.listRoots()
          List the available filesystem roots.
static File File.createTempFile(String prefix, String suffix, File directory)
           Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
static File File.createTempFile(String prefix, String suffix)
          Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.
 

Methods in java.io with parameters of type File
 boolean FileFilter.accept(File pathname)
          Tests whether or not the specified abstract pathname should be included in a pathname list.
 boolean File.renameTo(File dest)
          Renames the file denoted by this abstract pathname.
static File File.createTempFile(String prefix, String suffix, File directory)
           Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.
 int File.compareTo(File pathname)
          Compares two abstract pathnames lexicographically.
 boolean FilenameFilter.accept(File dir, String name)
          Tests if a specified file should be included in a file list.
 

Constructors in java.io with parameters of type File
FileInputStream(File file)
          Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.
FileWriter(File file)
          Constructs a FileWriter object given a File object.
FileWriter(File file, boolean append)
          Constructs a FileWriter object given a File object.
File(File parent, String child)
          Creates a new File instance from a parent abstract pathname and a child pathname string.
FileReader(File file)
          Creates a new FileReader, given the File to read from.
FileOutputStream(File file)
          Creates a file output stream to write to the file represented by the specified File object.
FileOutputStream(File file, boolean append)
          Creates a file output stream to write to the file represented by the specified File object.
RandomAccessFile(File file, String mode)
          Creates a random access file stream to read from, and optionally to write to, the file specified by the File argument.
 

Uses of File in java.lang
 

Methods in java.lang with parameters of type File
 Process Runtime.exec(String command, String[] envp, File dir)
          Executes the specified string command in a separate process with the specified environment and working directory.
 Process Runtime.exec(String[] cmdarray, String[] envp, File dir)
          Executes the specified command and arguments in a separate process with the specified environment and working directory.
 

Uses of File in java.util.jar
 

Constructors in java.util.jar with parameters of type File
JarFile(File file)
          Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify)
          Creates a new JarFile to read from the specified File object.
JarFile(File file, boolean verify, int mode)
          Creates a new JarFile to read from the specified File object in the specified mode.
 

Uses of File in java.util.zip
 

Constructors in java.util.zip with parameters of type File
ZipFile(File file, int mode)
          Opens a new ZipFile to read from the specified File object in the specified mode.
ZipFile(File file)
          Opens a ZIP file for reading given the specified File object.
 


JSR 217 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 217 specification.