JavaTM 2 Platform
Std. Ed. v1.3.1

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. 
javax.sound.midi Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data. 
javax.sound.midi.spi Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers. 
javax.sound.sampled Provides interfaces and classes for capture, processing, and playback of sampled audio data. 
javax.sound.sampled.spi Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters. 
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. 
javax.swing.filechooser Contains classes and interfaces used by the JFileChooser component. 
javax.swing.plaf Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities. 
javax.swing.plaf.basic Provides user interface objects built according to the Basic look-and-feel. 
javax.swing.plaf.metal Provides user interface objects built according to the ``metal'' look-and-feel. 
javax.swing.plaf.multi The multiplexing look and feel allows users to combine auxiliary look and feels with the default look and feel. 
 

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
FileOutputStream(File file)
          Creates a file output stream to write to the file represented by the specified 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.
FileWriter(File file)
          Constructs a FileWriter object given a 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.
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.
 

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.
 

Uses of File in javax.sound.midi
 

Methods in javax.sound.midi with parameters of type File
static Soundbank MidiSystem.getSoundbank(File file)
          Constructs a Soundbank by reading it from the specified File.
static MidiFileFormat MidiSystem.getMidiFileFormat(File file)
          Obtains the MIDI file format of the specified File.
static Sequence MidiSystem.getSequence(File file)
          Obtains a MIDI sequence from the specified File.
static int MidiSystem.write(Sequence in, int type, File out)
          Writes a stream of bytes representing a file of the MIDI file type indicated to the external file provided.
 

Uses of File in javax.sound.midi.spi
 

Methods in javax.sound.midi.spi with parameters of type File
abstract  Soundbank SoundbankReader.getSoundbank(File file)
          Obtains a soundbank object from the File provided.
abstract  MidiFileFormat MidiFileReader.getMidiFileFormat(File file)
          Obtains the MIDI file format of the File provided.
abstract  Sequence MidiFileReader.getSequence(File file)
          Obtains a MIDI sequence from the File provided.
abstract  int MidiFileWriter.write(Sequence in, int fileType, File out)
          Writes a stream of bytes representing a MIDI file of the file type indicated to the external file provided.
 

Uses of File in javax.sound.sampled
 

Methods in javax.sound.sampled with parameters of type File
static AudioFileFormat AudioSystem.getAudioFileFormat(File file)
          Obtains the audio file format of the specified File.
static AudioInputStream AudioSystem.getAudioInputStream(File file)
          Obtains an audio input stream from the provided File.
static int AudioSystem.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out)
          Writes a stream of bytes representing an audio file of the specified file type to the external file provided.
 

Uses of File in javax.sound.sampled.spi
 

Methods in javax.sound.sampled.spi with parameters of type File
abstract  int AudioFileWriter.write(AudioInputStream stream, AudioFileFormat.Type fileType, File out)
          Writes a stream of bytes representing an audio file of the file format indicated to the external file provided.
abstract  AudioFileFormat AudioFileReader.getAudioFileFormat(File file)
          Obtains the audio file format of the File provided.
abstract  AudioInputStream AudioFileReader.getAudioInputStream(File file)
          Obtains an audio input stream from the File provided.
 

Uses of File in javax.swing
 

Methods in javax.swing that return File
 File JFileChooser.getSelectedFile()
          Returns the selected file.
 File[] JFileChooser.getSelectedFiles()
          Returns a list of selected files if the file chooser is set to allow multiple selection.
 File JFileChooser.getCurrentDirectory()
          Returns the current directory.
 

Methods in javax.swing with parameters of type File
 void JFileChooser.setSelectedFile(File file)
          Sets the selected file.
 void JFileChooser.setSelectedFiles(File[] selectedFiles)
          Sets the list of selected files if the file chooser is set to allow multiple selection.
 void JFileChooser.setCurrentDirectory(File dir)
          Sets the current directory.
 void JFileChooser.ensureFileIsVisible(File f)
          Makes sure that the specified file is viewable, and not hidden.
 String JFileChooser.getName(File f)
          Returns the filename.
 String JFileChooser.getDescription(File f)
          Returns the file description.
 String JFileChooser.getTypeDescription(File f)
          Returns the file type.
 Icon JFileChooser.getIcon(File f)
          Returns the icon for this file or type of file, depending on the system.
 boolean JFileChooser.isTraversable(File f)
          Returns true if the file (directory) can be visited.
 boolean JFileChooser.accept(File f)
          Returns true if the file should be displayed.
 

Constructors in javax.swing with parameters of type File
JFileChooser(File currentDirectory)
          Constructs a JFileChooser using the given File as the path.
JFileChooser(File currentDirectory, FileSystemView fsv)
          Constructs a JFileChooser using the given current directory and FileSystemView.
 

Uses of File in javax.swing.filechooser
 

Methods in javax.swing.filechooser that return File
abstract  File FileSystemView.createNewFolder(File containingDir)
          creates a new folder with a default folder name.
abstract  File[] FileSystemView.getRoots()
          Returns all root partitians on this system.
 File FileSystemView.getHomeDirectory()
           
 File FileSystemView.createFileObject(File dir, String filename)
          Returns a File object constructed in dir from the given filename.
 File FileSystemView.createFileObject(String path)
          Returns a File object constructed from the given path string.
 File[] FileSystemView.getFiles(File dir, boolean useFileHiding)
          gets the list of shown (i.e.
 File FileSystemView.getParentDirectory(File dir)
          Returns the parent directory of dir.
 

Methods in javax.swing.filechooser with parameters of type File
 String FileView.getName(File f)
          The name of the file.
 String FileView.getDescription(File f)
          A human readable description of the file.
 String FileView.getTypeDescription(File f)
          A human readable description of the type of the file.
 Icon FileView.getIcon(File f)
          The icon that represents this file in the JFileChooser.
 Boolean FileView.isTraversable(File f)
          Whether the directory is traversable or not.
abstract  boolean FileSystemView.isRoot(File f)
          Determines if the given file is a root partition or drive.
abstract  File FileSystemView.createNewFolder(File containingDir)
          creates a new folder with a default folder name.
abstract  boolean FileSystemView.isHiddenFile(File f)
          Returns whether a file is hidden or not.
 File FileSystemView.createFileObject(File dir, String filename)
          Returns a File object constructed in dir from the given filename.
 File[] FileSystemView.getFiles(File dir, boolean useFileHiding)
          gets the list of shown (i.e.
 File FileSystemView.getParentDirectory(File dir)
          Returns the parent directory of dir.
abstract  boolean FileFilter.accept(File f)
          Whether the given file is accepted by this filter.
 

Uses of File in javax.swing.plaf
 

Methods in javax.swing.plaf with parameters of type File
abstract  void FileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
           
 

Uses of File in javax.swing.plaf.basic
 

Methods in javax.swing.plaf.basic with parameters of type File
 void BasicFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
           
 boolean BasicFileChooserUI.AcceptAllFileFilter.accept(File f)
           
 String BasicFileChooserUI.BasicFileView.getName(File f)
           
 String BasicFileChooserUI.BasicFileView.getDescription(File f)
           
 String BasicFileChooserUI.BasicFileView.getTypeDescription(File f)
           
 Icon BasicFileChooserUI.BasicFileView.getCachedIcon(File f)
           
 void BasicFileChooserUI.BasicFileView.cacheIcon(File f, Icon i)
           
 Icon BasicFileChooserUI.BasicFileView.getIcon(File f)
           
 Boolean BasicFileChooserUI.BasicFileView.isTraversable(File f)
           
 Boolean BasicFileChooserUI.BasicFileView.isHidden(File f)
           
protected  boolean BasicDirectoryModel.lt(File a, File b)
           
 

Uses of File in javax.swing.plaf.metal
 

Methods in javax.swing.plaf.metal with parameters of type File
 void MetalFileChooserUI.ensureFileIsVisible(JFileChooser fc, File f)
           
 

Uses of File in javax.swing.plaf.multi
 

Methods in javax.swing.plaf.multi with parameters of type File
 void MultiFileChooserUI.ensureFileIsVisible(JFileChooser a, File b)
          Call ensureFileIsVisible on each UI handled by this MultiUI.
 


JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Java, Java 2D, and JDBC are trademarks or registered trademarks of Oracle and/or its affiliates, in the US and other countries.
Copyright © 1995, 2010 Oracle and/or its affiliates. All rights reserved.