Uses of Class
java.io.File
-
Packages that use File Package Description com.sun.javadoc Note: The declarations in this package have been superseded by those in the packagejdk.javadoc.doclet
.java.awt Contains all of the classes for creating user interfaces and for painting graphics and images.java.awt.desktop Provides interfaces and classes for interaction with various desktop capabilities.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.nio.file Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.java.security Provides the classes and interfaces for the security framework.java.util Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.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.javafx.css Provides API for making properties styleable via CSS and for supporting pseudo-class state.javafx.scene.input Provides the set of classes for mouse and keyboard input event handling.javafx.scene.web This package provides means for loading and displaying Web content.javafx.stage Provides the top-level container classes for JavaFX content.javax.activation javax.imageio The main package of the Java Image I/O API.javax.imageio.spi A package of the Java Image I/O API containing the plug-in interfaces for readers, writers, transcoders, and streams, and a runtime registry.javax.imageio.stream A package of the Java Image I/O API dealing with low-level I/O from files and streams.javax.jnlp The JNLP API is designed to provide additional services to JNLP applications running in the Java Plugin or launched by Java Web Start.javax.security.auth.kerberos This package contains utility classes related to the Kerberos network authentication protocol.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 theJFileChooser
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.multi Provides user interface objects that combine two or more look and feels.javax.tools Provides interfaces for tools which can be invoked from a program, for example, compilers.javax.xml.bind Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.javax.xml.parsers Provides the classes for processing XML documents with a SAX (Simple API for XML) parser or a DOM (Document Object Model) Document builder.javax.xml.transform.stream Provides stream and URI specific transformation classes.javax.xml.validation Provides an API for validation of XML documents.jdk.nashorn.api.tree Nashorn parser API provides interfaces to represent ECMAScript source code as abstract syntax trees (AST) and Parser to parse ECMAScript source scripts. -
-
Uses of File in com.sun.javadoc
Methods in com.sun.javadoc that return File Modifier and Type Method Description File
SourcePosition. file()
Deprecated.The source file. -
Uses of File in java.awt
Methods in java.awt that return File Modifier and Type Method Description File[]
FileDialog. getFiles()
Returns files that the user selects.Methods in java.awt with parameters of type File Modifier and Type Method Description void
Desktop. browseFileDirectory(File file)
Opens a folder containing thefile
and selects it in a default system file manager.static Font
Font. createFont(int fontFormat, File fontFile)
Returns a newFont
using the specified font type and the specified font file.static Font[]
Font. createFonts(File fontFile)
Returns a new array ofFont
decoded from the specified file.void
Desktop. edit(File file)
Launches the associated editor application and opens a file for editing.boolean
Desktop. moveToTrash(File file)
Moves the specified file to the trash.void
Desktop. open(File file)
Launches the associated application to open the file.void
Desktop. print(File file)
Prints a file with the native desktop printing facility, using the associated application's print command. -
Uses of File in java.awt.desktop
Methods in java.awt.desktop that return types with arguments of type File Modifier and Type Method Description List<File>
FilesEvent. getFiles()
Gets the list of filesConstructor parameters in java.awt.desktop with type arguments of type File Constructor Description OpenFilesEvent(List<File> files, String searchTerm)
Constructs anOpenFilesEvent
PrintFilesEvent(List<File> files)
Constructs aPrintFilesEvent
-
Uses of File in java.io
Methods in java.io that return File Modifier and Type Method Description 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.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.File
File. getAbsoluteFile()
Returns the absolute form of this abstract pathname.File
File. getCanonicalFile()
Returns the canonical form of this abstract pathname.File
File. getParentFile()
Returns the abstract pathname of this abstract pathname's parent, ornull
if this pathname does not name a parent directory.File[]
File. listFiles()
Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.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.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.static File[]
File. listRoots()
List the available filesystem roots.Methods in java.io with parameters of type File Modifier and Type Method Description boolean
FileFilter. accept(File pathname)
Tests whether or not the specified abstract pathname should be included in a pathname list.boolean
FilenameFilter. accept(File dir, String name)
Tests if a specified file should be included in a file list.int
File. compareTo(File pathname)
Compares two abstract pathnames lexicographically.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.boolean
File. renameTo(File dest)
Renames the file denoted by this abstract pathname.Constructors in java.io with parameters of type File Constructor Description File(File parent, String child)
Creates a newFile
instance from a parent abstract pathname and a child pathname string.FileInputStream(File file)
Creates aFileInputStream
by opening a connection to an actual file, the file named by theFile
objectfile
in the file system.FileOutputStream(File file)
Creates a file output stream to write to the file represented by the specifiedFile
object.FileOutputStream(File file, boolean append)
Creates a file output stream to write to the file represented by the specifiedFile
object.FileReader(File file)
Creates a newFileReader
, given theFile
to read from.FileWriter(File file)
Constructs a FileWriter object given a File object.FileWriter(File file, boolean append)
Constructs a FileWriter object given a File object.PrintStream(File file)
Creates a new print stream, without automatic line flushing, with the specified file.PrintStream(File file, String csn)
Creates a new print stream, without automatic line flushing, with the specified file and charset.PrintStream(File file, Charset charset)
Creates a new print stream, without automatic line flushing, with the specified file and charset.PrintWriter(File file)
Creates a new PrintWriter, without automatic line flushing, with the specified file.PrintWriter(File file, String csn)
Creates a new PrintWriter, without automatic line flushing, with the specified file and charset.PrintWriter(File file, Charset charset)
Creates a new PrintWriter, without automatic line flushing, with the specified file and charset.RandomAccessFile(File file, String mode)
Creates a random access file stream to read from, and optionally to write to, the file specified by theFile
argument. -
Uses of File in java.lang
Methods in java.lang that return File Modifier and Type Method Description File
ProcessBuilder. directory()
Returns this process builder's working directory.File
ProcessBuilder.Redirect. file()
Returns theFile
source or destination associated with this redirect, ornull
if there is no such file.Methods in java.lang with parameters of type File Modifier and Type Method Description static ProcessBuilder.Redirect
ProcessBuilder.Redirect. appendTo(File file)
Returns a redirect to append to the specified file.ProcessBuilder
ProcessBuilder. directory(File directory)
Sets this process builder's 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.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.static ProcessBuilder.Redirect
ProcessBuilder.Redirect. from(File file)
Returns a redirect to read from the specified file.ProcessBuilder
ProcessBuilder. redirectError(File file)
Sets this process builder's standard error destination to a file.ProcessBuilder
ProcessBuilder. redirectInput(File file)
Sets this process builder's standard input source to a file.ProcessBuilder
ProcessBuilder. redirectOutput(File file)
Sets this process builder's standard output destination to a file.static ProcessBuilder.Redirect
ProcessBuilder.Redirect. to(File file)
Returns a redirect to write to the specified file. -
Uses of File in java.nio.file
Methods in java.nio.file that return File Modifier and Type Method Description default File
Path. toFile()
Returns aFile
object representing this path. -
Uses of File in java.security
Methods in java.security with parameters of type File Modifier and Type Method Description static KeyStore
KeyStore. getInstance(File file, char[] password)
Returns a loaded keystore object of the appropriate keystore type.static KeyStore
KeyStore. getInstance(File file, KeyStore.LoadStoreParameter param)
Returns a loaded keystore object of the appropriate keystore type.static KeyStore.Builder
KeyStore.Builder. newInstance(File file, KeyStore.ProtectionParameter protection)
Returns a new Builder object.static KeyStore.Builder
KeyStore.Builder. newInstance(String type, Provider provider, File file, KeyStore.ProtectionParameter protection)
Returns a new Builder object. -
Uses of File in java.util
Constructors in java.util with parameters of type File Constructor Description Formatter(File file)
Constructs a new formatter with the specified file.Formatter(File file, String csn)
Constructs a new formatter with the specified file and charset.Formatter(File file, String csn, Locale l)
Constructs a new formatter with the specified file, charset, and locale.Formatter(File file, Charset charset, Locale l)
Constructs a new formatter with the specified file, charset, and locale.Scanner(File source)
Constructs a newScanner
that produces values scanned from the specified file.Scanner(File source, String charsetName)
Constructs a newScanner
that produces values scanned from the specified file.Scanner(File source, Charset charset)
Constructs a newScanner
that produces values scanned from the specified file. -
Uses of File in java.util.jar
Methods in java.util.jar with parameters of type File Modifier and Type Method Description void
Pack200.Unpacker. unpack(File in, JarOutputStream out)
Read a Pack200 archive, and write the encoded JAR to a JarOutputStream.Constructors in java.util.jar with parameters of type File Constructor Description JarFile(File file)
Creates a newJarFile
to read from the specifiedFile
object.JarFile(File file, boolean verify)
Creates a newJarFile
to read from the specifiedFile
object.JarFile(File file, boolean verify, int mode)
Creates a newJarFile
to read from the specifiedFile
object in the specified mode.JarFile(File file, boolean verify, int mode, Runtime.Version version)
Creates a newJarFile
to read from the specifiedFile
object in the specified mode. -
Uses of File in java.util.zip
Constructors in java.util.zip with parameters of type File Constructor Description ZipFile(File file)
Opens a ZIP file for reading given the specified File object.ZipFile(File file, int mode)
Opens a newZipFile
to read from the specifiedFile
object in the specified mode.ZipFile(File file, int mode, Charset charset)
Opens a newZipFile
to read from the specifiedFile
object in the specified mode.ZipFile(File file, Charset charset)
Opens a ZIP file for reading given the specified File object. -
Uses of File in javafx.css
Methods in javafx.css with parameters of type File Modifier and Type Method Description static void
Stylesheet. convertToBinary(File source, File destination)
Convert the .css file referenced by urlIn to binary format and write to urlOut. -
Uses of File in javafx.scene.input
Methods in javafx.scene.input that return types with arguments of type File Modifier and Type Method Description List<File>
Clipboard. getFiles()
Gets the List of Files from the clipboard which had previously been registered.List<File>
ClipboardContent. getFiles()
Gets the List of Files from theClipboardContent
which had previously been put.Method parameters in javafx.scene.input with type arguments of type File Modifier and Type Method Description boolean
ClipboardContent. putFiles(List<File> files)
Puts a List of Files into theClipboardContent
. -
Uses of File in javafx.scene.web
Methods in javafx.scene.web that return File Modifier and Type Method Description File
WebEngine. getUserDataDirectory()
Gets the value of the property userDataDirectory.Methods in javafx.scene.web that return types with arguments of type File Modifier and Type Method Description ObjectProperty<File>
WebEngine. userDataDirectoryProperty()
Specifies the directory to be used by thisWebEngine
to store local user data.Methods in javafx.scene.web with parameters of type File Modifier and Type Method Description void
WebEngine. setUserDataDirectory(File value)
Sets the value of the property userDataDirectory. -
Uses of File in javafx.stage
Methods in javafx.stage that return File Modifier and Type Method Description File
DirectoryChooser. getInitialDirectory()
Gets the value of the property initialDirectory.File
FileChooser. getInitialDirectory()
Gets the value of the property initialDirectory.File
DirectoryChooser. showDialog(Window ownerWindow)
Shows a new directory selection dialog.File
FileChooser. showOpenDialog(Window ownerWindow)
Shows a new file open dialog.File
FileChooser. showSaveDialog(Window ownerWindow)
Shows a new file save dialog.Methods in javafx.stage that return types with arguments of type File Modifier and Type Method Description ObjectProperty<File>
DirectoryChooser. initialDirectoryProperty()
The initial directory for the displayed dialog.ObjectProperty<File>
FileChooser. initialDirectoryProperty()
The initial directory for the displayed file dialog.List<File>
FileChooser. showOpenMultipleDialog(Window ownerWindow)
Shows a new file open dialog in which multiple files can be selected.Methods in javafx.stage with parameters of type File Modifier and Type Method Description void
DirectoryChooser. setInitialDirectory(File value)
Sets the value of the property initialDirectory.void
FileChooser. setInitialDirectory(File value)
Sets the value of the property initialDirectory. -
Uses of File in javax.activation
Methods in javax.activation that return File Modifier and Type Method Description File
FileDataSource. getFile()
Return the File object that corresponds to this FileDataSource.Methods in javax.activation with parameters of type File Modifier and Type Method Description abstract String
FileTypeMap. getContentType(File file)
Return the type of the file object.String
MimetypesFileTypeMap. getContentType(File f)
Return the MIME type of the file object.Constructors in javax.activation with parameters of type File Constructor Description FileDataSource(File file)
Creates a FileDataSource from a File object. -
Uses of File in javax.imageio
Methods in javax.imageio that return File Modifier and Type Method Description static File
ImageIO. getCacheDirectory()
Returns the current value set bysetCacheDirectory
, ornull
if no explicit setting has been made.Methods in javax.imageio with parameters of type File Modifier and Type Method Description static BufferedImage
ImageIO. read(File input)
Returns aBufferedImage
as the result of decoding a suppliedFile
with anImageReader
chosen automatically from among those currently registered.static void
ImageIO. setCacheDirectory(File cacheDirectory)
Sets the directory where cache files are to be created.static boolean
ImageIO. write(RenderedImage im, String formatName, File output)
Writes an image using an arbitraryImageWriter
that supports the given format to aFile
. -
Uses of File in javax.imageio.spi
Methods in javax.imageio.spi with parameters of type File Modifier and Type Method Description abstract ImageInputStream
ImageInputStreamSpi. createInputStreamInstance(Object input, boolean useCache, File cacheDir)
Returns an instance of theImageInputStream
implementation associated with this service provider.abstract ImageOutputStream
ImageOutputStreamSpi. createOutputStreamInstance(Object output, boolean useCache, File cacheDir)
Returns an instance of theImageOutputStream
implementation associated with this service provider. -
Uses of File in javax.imageio.stream
Constructors in javax.imageio.stream with parameters of type File Constructor Description FileCacheImageInputStream(InputStream stream, File cacheDir)
Constructs aFileCacheImageInputStream
that will read from a givenInputStream
.FileCacheImageOutputStream(OutputStream stream, File cacheDir)
Constructs aFileCacheImageOutputStream
that will write to a givenoutputStream
.FileImageInputStream(File f)
Constructs aFileImageInputStream
that will read from a givenFile
.FileImageOutputStream(File f)
Constructs aFileImageOutputStream
that will write to a givenFile
. -
Uses of File in javax.jnlp
Methods in javax.jnlp with parameters of type File Modifier and Type Method Description FileContents
ExtendedService. openFile(File file)
Allows the application to open the specified file, even if the application is running in the untrusted execution environment.FileContents[]
ExtendedService. openFiles(File[] files)
Allows the application to open the specified files, even if the application is running in the untrusted execution environment. -
Uses of File in javax.security.auth.kerberos
Methods in javax.security.auth.kerberos with parameters of type File Modifier and Type Method Description static KeyTab
KeyTab. getInstance(File file)
Returns aKeyTab
instance from aFile
object that is bound to an unknown service principal.static KeyTab
KeyTab. getInstance(KerberosPrincipal princ, File file)
Returns aKeyTab
instance from aFile
object that is bound to the specified service principal.static KeyTab
KeyTab. getUnboundInstance(File file)
Returns an unboundKeyTab
instance from aFile
object. -
Uses of File in javax.sound.midi
Methods in javax.sound.midi with parameters of type File Modifier and Type Method Description static MidiFileFormat
MidiSystem. getMidiFileFormat(File file)
Obtains the MIDI file format of the specifiedFile
.static Sequence
MidiSystem. getSequence(File file)
Obtains a MIDI sequence from the specifiedFile
.static Soundbank
MidiSystem. getSoundbank(File file)
Constructs aSoundbank
by reading it from the specifiedFile
.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 Modifier and Type Method Description abstract MidiFileFormat
MidiFileReader. getMidiFileFormat(File file)
Obtains the MIDI file format of theFile
provided.abstract Sequence
MidiFileReader. getSequence(File file)
Obtains a MIDI sequence from theFile
provided.abstract Soundbank
SoundbankReader. getSoundbank(File file)
Obtains a soundbank object from theFile
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 Modifier and Type Method Description static AudioFileFormat
AudioSystem. getAudioFileFormat(File file)
Obtains the audio file format of the specifiedFile
.static AudioInputStream
AudioSystem. getAudioInputStream(File file)
Obtains an audio input stream from the providedFile
.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 Modifier and Type Method Description abstract AudioFileFormat
AudioFileReader. getAudioFileFormat(File file)
Obtains the audio file format of theFile
provided.abstract AudioInputStream
AudioFileReader. getAudioInputStream(File file)
Obtains an audio input stream from theFile
provided.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. -
Uses of File in javax.swing
Methods in javax.swing that return File Modifier and Type Method Description File
JFileChooser. getCurrentDirectory()
Returns the current directory.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.Methods in javax.swing with parameters of type File Modifier and Type Method Description boolean
JFileChooser. accept(File f)
Returns true if the file should be displayed.void
JFileChooser. ensureFileIsVisible(File f)
Makes sure that the specified file is viewable, and not hidden.String
JFileChooser. getDescription(File f)
Returns the file description.Icon
JFileChooser. getIcon(File f)
Returns the icon for this file or type of file, depending on the system.String
JFileChooser. getName(File f)
Returns the filename.String
JFileChooser. getTypeDescription(File f)
Returns the file type.boolean
JFileChooser. isTraversable(File f)
Returns true if the file (directory) can be visited.void
JFileChooser. setCurrentDirectory(File dir)
Sets the current directory.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.Constructors in javax.swing with parameters of type File Constructor Description JFileChooser(File currentDirectory)
Constructs aJFileChooser
using the givenFile
as the path.JFileChooser(File currentDirectory, FileSystemView fsv)
Constructs aJFileChooser
using the given current directory andFileSystemView
. -
Uses of File in javax.swing.filechooser
Methods in javax.swing.filechooser that return File Modifier and Type Method Description 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.protected File
FileSystemView. createFileSystemRoot(File f)
Creates a newFile
object forf
with correct behavior for a file system root directory.abstract File
FileSystemView. createNewFolder(File containingDir)
Creates a new folder with a default folder name.File
FileSystemView. getChild(File parent, String fileName)
File[]
FileSystemView. getChooserComboBoxFiles()
Returns an array of files representing the values to show by default in the file chooser selector.File
FileSystemView. getDefaultDirectory()
Return the user's default starting directory for the file chooser.File[]
FileSystemView. getFiles(File dir, boolean useFileHiding)
Gets the list of shown (i.e. not hidden) files.File
FileSystemView. getHomeDirectory()
Returns the home directory.File
FileSystemView. getLinkLocation(File file)
Returns the regular file referenced by the specified link file if the specified file is a shell interpreted link.File
FileSystemView. getParentDirectory(File dir)
Returns the parent directory ofdir
.File[]
FileSystemView. getRoots()
Returns all root partitions on this system.Methods in javax.swing.filechooser with parameters of type File Modifier and Type Method Description abstract boolean
FileFilter. accept(File f)
Whether the given file is accepted by this filter.boolean
FileNameExtensionFilter. accept(File f)
Tests the specified file, returning true if the file is accepted, false otherwise.File
FileSystemView. createFileObject(File dir, String filename)
Returns a File object constructed in dir from the given filename.protected File
FileSystemView. createFileSystemRoot(File f)
Creates a newFile
object forf
with correct behavior for a file system root directory.abstract File
FileSystemView. createNewFolder(File containingDir)
Creates a new folder with a default folder name.File
FileSystemView. getChild(File parent, String fileName)
String
FileView. getDescription(File f)
A human readable description of the file.File[]
FileSystemView. getFiles(File dir, boolean useFileHiding)
Gets the list of shown (i.e. not hidden) files.Icon
FileView. getIcon(File f)
The icon that represents this file in theJFileChooser
.File
FileSystemView. getLinkLocation(File file)
Returns the regular file referenced by the specified link file if the specified file is a shell interpreted link.String
FileView. getName(File f)
The name of the file.File
FileSystemView. getParentDirectory(File dir)
Returns the parent directory ofdir
.String
FileSystemView. getSystemDisplayName(File f)
Name of a file, directory, or folder as it would be displayed in a system file browser.Icon
FileSystemView. getSystemIcon(File f)
Icon for a file, directory, or folder as it would be displayed in a system file browser.String
FileSystemView. getSystemTypeDescription(File f)
Type description for a file, directory, or folder as it would be displayed in a system file browser.String
FileView. getTypeDescription(File f)
A human readable description of the type of the file.boolean
FileSystemView. isComputerNode(File dir)
Used by UI classes to decide whether to display a special icon for a computer node, e.g.boolean
FileSystemView. isDrive(File dir)
Used by UI classes to decide whether to display a special icon for drives or partitions, e.g. a "hard disk" icon.boolean
FileSystemView. isFileSystem(File f)
Checks iff
represents a real directory or file as opposed to a special folder such as"Desktop"
.boolean
FileSystemView. isFileSystemRoot(File dir)
Is dir the root of a tree in the file system, such as a drive or partition.boolean
FileSystemView. isFloppyDrive(File dir)
Used by UI classes to decide whether to display a special icon for a floppy disk.boolean
FileSystemView. isHiddenFile(File f)
Returns whether a file is hidden or not.boolean
FileSystemView. isLink(File file)
Returns whether the specified file denotes a shell interpreted link which can be obtained by theFileSystemView.getLinkLocation(File)
.boolean
FileSystemView. isParent(File folder, File file)
On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem.boolean
FileSystemView. isRoot(File f)
Determines if the given file is a root in the navigable tree(s).Boolean
FileSystemView. isTraversable(File f)
Returns true if the file (directory) can be visited.Boolean
FileView. isTraversable(File f)
Whether the directory is traversable or not. -
Uses of File in javax.swing.plaf
Methods in javax.swing.plaf with parameters of type File Modifier and Type Method Description abstract void
FileChooserUI. ensureFileIsVisible(JFileChooser fc, File f)
Ensure the file in question is visible. -
Uses of File in javax.swing.plaf.basic
Fields in javax.swing.plaf.basic with type parameters of type File Modifier and Type Field Description protected Hashtable<File,Icon>
BasicFileChooserUI.BasicFileView. iconCache
The icon cacheMethods in javax.swing.plaf.basic that return File Modifier and Type Method Description protected File
BasicFileChooserUI. getDirectory()
Property to remember the directory that is currently selected in the UI.Methods in javax.swing.plaf.basic that return types with arguments of type File Modifier and Type Method Description Vector<File>
BasicDirectoryModel. getDirectories()
Returns a list of directories.Vector<File>
BasicDirectoryModel. getFiles()
Returns a list of files.Methods in javax.swing.plaf.basic with parameters of type File Modifier and Type Method Description boolean
BasicFileChooserUI.AcceptAllFileFilter. accept(File f)
Returns true.void
BasicFileChooserUI.BasicFileView. cacheIcon(File f, Icon i)
Caches an icon for a file.Icon
BasicFileChooserUI.BasicFileView. getCachedIcon(File f)
Returns the cached icon for the file.Boolean
BasicFileChooserUI.BasicFileView. isHidden(File f)
Returns whether or not a file is hidden.protected boolean
BasicDirectoryModel. lt(File a, File b)
Obsolete - not usedboolean
BasicDirectoryModel. renameFile(File oldFile, File newFile)
Renames a file in the underlying file system.protected void
BasicFileChooserUI. setDirectory(File f)
Property to remember the directory that is currently selected in the UI.Method parameters in javax.swing.plaf.basic with type arguments of type File Modifier and Type Method Description protected void
BasicDirectoryModel. sort(Vector<? extends File> v)
Sorts a list of files. -
Uses of File in javax.swing.plaf.multi
Methods in javax.swing.plaf.multi with parameters of type File Modifier and Type Method Description void
MultiFileChooserUI. ensureFileIsVisible(JFileChooser a, File b)
Invokes theensureFileIsVisible
method on each UI handled by this object. -
Uses of File in javax.tools
Methods in javax.tools that return types with arguments of type File Modifier and Type Method Description Iterable<? extends File>
StandardJavaFileManager. getLocation(JavaFileManager.Location location)
Returns the search path associated with the given location.Methods in javax.tools with parameters of type File Modifier and Type Method Description Iterable<? extends JavaFileObject>
StandardJavaFileManager. getJavaFileObjects(File... files)
Returns file objects representing the given files.Method parameters in javax.tools with type arguments of type File Modifier and Type Method Description Iterable<? extends JavaFileObject>
StandardJavaFileManager. getJavaFileObjectsFromFiles(Iterable<? extends File> files)
Returns file objects representing the given files.void
StandardJavaFileManager. setLocation(JavaFileManager.Location location, Iterable<? extends File> files)
Associates the given search path with the given location. -
Uses of File in javax.xml.bind
Methods in javax.xml.bind with parameters of type File Modifier and Type Method Description static void
JAXB. marshal(Object jaxbObject, File xml)
Writes a Java object tree to XML and store it to the specified location.void
Marshaller. marshal(Object jaxbElement, File output)
Marshal the content tree rooted atjaxbElement
into a file.static <T> T
JAXB. unmarshal(File xml, Class<T> type)
Reads in a Java object tree from the given XML input.Object
Unmarshaller. unmarshal(File f)
Unmarshal XML data from the specified file and return the resulting content tree. -
Uses of File in javax.xml.parsers
Methods in javax.xml.parsers with parameters of type File Modifier and Type Method Description Document
DocumentBuilder. parse(File f)
Parse the content of the given file as an XML document and return a new DOMDocument
object.void
SAXParser. parse(File f, HandlerBase hb)
Parse the content of the file specified as XML using the specifiedHandlerBase
.void
SAXParser. parse(File f, DefaultHandler dh)
Parse the content of the file specified as XML using the specifiedDefaultHandler
. -
Uses of File in javax.xml.transform.stream
Methods in javax.xml.transform.stream with parameters of type File Modifier and Type Method Description void
StreamResult. setSystemId(File f)
Set the system ID from aFile
reference.void
StreamSource. setSystemId(File f)
Set the system ID from a File reference.Constructors in javax.xml.transform.stream with parameters of type File Constructor Description StreamResult(File f)
Construct a StreamResult from a File.StreamSource(File f)
Construct a StreamSource from a File. -
Uses of File in javax.xml.validation
Methods in javax.xml.validation with parameters of type File Modifier and Type Method Description Schema
SchemaFactory. newSchema(File schema)
Parses the specifiedFile
as a schema and returns it as aSchema
. -
Uses of File in jdk.nashorn.api.tree
Methods in jdk.nashorn.api.tree with parameters of type File Modifier and Type Method Description CompilationUnitTree
Parser. parse(File file, DiagnosticListener listener)
Parses the source file and returns compilation unit tree
-