Packages java io file

Package java.io

Provides for system input and output through data streams, serialization and the file system. Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown.

Object Serialization

Warning: Deserialization of untrusted data is inherently dangerous and should be avoided. Untrusted data should be carefully validated according to the «Serialization and Deserialization» section of the Secure Coding Guidelines for Java SE.

The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types.

Читайте также:  Html position float right

The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream.

Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances.

FilterInfo provides access to information about the current object being deserialized and the status of the ObjectInputStream .

A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the input and to support the mark and reset methods.

Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.

Writes text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.

A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream.

Methods to access the character-based console device, if any, associated with the current Java virtual machine.

A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.

A data output stream lets an application write primitive Java data types to an output stream in a portable way.

Instances of the file descriptor class serve as an opaque handle to the underlying machine-specific structure representing an open file, an open socket, or another source or sink of bytes.

A FilterInputStream contains some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.

An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset .

An ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.

An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specified charset .

A piped input stream should be connected to a piped output stream; the piped input stream then provides whatever data bytes are written to the piped output stream.

A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently.

A PushbackInputStream adds functionality to another input stream, namely the ability to «push back» or «unread» bytes, by storing pushed-back bytes in an internal buffer.

The StreamTokenizer class takes an input stream and parses it into «tokens», allowing the tokens to be read one at a time.

A character stream that collects its output in a string buffer, which can then be used to construct a string.

Exception indicating the failure of an object read operation due to unread primitive data, or the end of data belonging to a serialized object in the stream.

Thrown when control information that was read from an object stream violates internal consistency checks.

Signals that a malformed string in modified UTF-8 format has been read in a data input stream or by any class that implements the data input interface.

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

Источник

Packages java io file

Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.

Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array).

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.

A package of the Java Image I/O API containing the plug-in interfaces for readers, writers, transcoders, and streams, and a runtime registry.

Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.

Supplies interfaces for service providers to implement when offering new MIDI devices, MIDI file readers and writers, or sound bank readers.

Supplies abstract classes for service providers to subclass when offering new audio devices, sound file readers and writers, or audio format converters.

Provides a set of «lightweight» (all-Java language) components that, to the maximum degree possible, work the same on all platforms.

Provides one interface and many abstract classes that Swing uses to provide its pluggable look-and-feel capabilities.

Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.

Provides a runtime binding framework for client applications including unmarshalling, marshalling, and validation capabilities.

JAXB Provider Use Only: Provides partial default implementations for some of the javax.xml.bind interfaces.

Uses of File in java.awt

Prints a file with the native desktop printing facility, using the associated application’s print command.

Uses of File in java.io

Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name.

Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.

Returns the abstract pathname of this abstract pathname’s parent, or null if this pathname does not name a parent directory.

Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.

Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified 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.

Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name.

Creates a FileInputStream by opening a connection to an actual file, the file named by the File object file in the file system.

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

Returns the File source or destination associated with this redirect, or null if there is no such file.

Executes the specified command and arguments in a separate process with the specified environment and working directory.

Executes the specified string command in a separate process with the specified environment and working directory.

Uses of File in java.nio.file

Uses of File in java.security

Methods in java.security with parameters of type File
Modifier and Type Method and Description
static KeyStore.Builder KeyStore.Builder. newInstance (String type, Provider provider, File file, KeyStore.ProtectionParameter protection)

Uses of File in java.util

Uses of File in java.util.jar

Methods in java.util.jar with parameters of type File
Modifier and Type Method and Description
void Pack200.Unpacker. unpack (File in, JarOutputStream out)

Uses of File in java.util.zip

Uses of File in javax.activation

Uses of File in javax.imageio

Returns a BufferedImage as the result of decoding a supplied File with an ImageReader chosen automatically from among those currently registered.

Uses of File in javax.imageio.spi

Methods in javax.imageio.spi with parameters of type File
Modifier and Type Method and Description
abstract ImageInputStream ImageInputStreamSpi. createInputStreamInstance (Object input, boolean useCache, File cacheDir)

Uses of File in javax.imageio.stream

Uses of File in javax.security.auth.kerberos

Methods in javax.security.auth.kerberos with parameters of type File
Modifier and Type Method and Description
static KeyTab KeyTab. getInstance (File file)

Uses of File in javax.sound.midi

Methods in javax.sound.midi with parameters of type File
Modifier and Type Method and Description
static MidiFileFormat MidiSystem. getMidiFileFormat (File file)

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 and Description
abstract MidiFileFormat MidiFileReader. getMidiFileFormat (File file)

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 and Description
static AudioFileFormat AudioSystem. getAudioFileFormat (File file)

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 and Description
abstract AudioFileFormat AudioFileReader. getAudioFileFormat (File file)

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

Uses of File in javax.swing.filechooser

Methods in javax.swing.filechooser that return File
Modifier and Type Method and Description
File FileSystemView. createFileObject (File dir, String filename)

On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem.

Uses of File in javax.swing.plaf

Uses of File in javax.swing.plaf.basic

Fields in javax.swing.plaf.basic with type parameters of type File
Modifier and Type Field and Description
protected Hashtable BasicFileChooserUI.BasicFileView. iconCache
Methods in javax.swing.plaf.basic that return File
Modifier and Type Method and Description
protected File BasicFileChooserUI. getDirectory ()

Uses of File in javax.swing.plaf.metal

Uses of File in javax.swing.plaf.multi

Methods in javax.swing.plaf.multi with parameters of type File
Modifier and Type Method and Description
void MultiFileChooserUI. ensureFileIsVisible (JFileChooser a, File b)

Uses of File in javax.tools

Methods in javax.tools that return types with arguments of type File
Modifier and Type Method and Description
Iterable StandardJavaFileManager. getLocation (JavaFileManager.Location location)

Uses of File in javax.xml.bind

Methods in javax.xml.bind with parameters of type File
Modifier and Type Method and Description
static void JAXB. marshal (Object jaxbObject, File xml)

Uses of File in javax.xml.bind.helpers

Uses of File in javax.xml.parsers

Methods in javax.xml.parsers with parameters of type File
Modifier and Type Method and Description
Document DocumentBuilder. parse (File f)

Uses of File in javax.xml.transform.stream

Methods in javax.xml.transform.stream with parameters of type File
Modifier and Type Method and Description
void StreamSource. setSystemId (File f)

Uses of File in javax.xml.validation

Methods in javax.xml.validation with parameters of type File
Modifier and Type Method and Description
Schema SchemaFactory. newSchema (File schema)

Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.

Источник

Оцените статью