Uses of Interface
java.lang.AutoCloseable
Packages that useAutoCloseable
Package
Description
Provides a simple high-level Http server API, which can be used to build embedded HTTP servers.
A Java API for Stream Control Transport Protocol.
Contains classes related to developingbeans -- components based on the JavaBeans architecture.
Provides for system input and output through data streams, serialization and the file system.
Provides low-level access to memory and functions outside the Java runtime.
Classes to support module descriptors and creating configurations of modules by means of resolution and service binding.
Provides the classes for implementing networking applications.
HTTP Client and WebSocket APIs
Defines channels, which represent connections to entities that are capable of performing I/O operations, such as files and sockets; defines selectors, for multiplexed, non-blocking I/O operations.
Service-provider classes for the
java.nio.channels package.Defines interfaces and classes for the Java virtual machine to access files, file attributes, and file systems.
Provides classes and interfaces for supporting the server side of RMI.
Provides the classes and interfaces for the security framework.
Provides the API for accessing and processing data stored in a data source (usually a relational database) using the Java programming language.
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.
Utility classes commonly useful in concurrent programming.
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.
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.
Provides classes for reading and writing the standard ZIP and GZIP file formats.
Provides the classes and interfaces for cryptographic operations.
A package of the Java Image I/O API dealing with low-level I/O from files and streams.
Provides the classes which implement advanced dynamic loading.
Interfaces for remote access to JMX MBean servers.
The RMI connector is a connector for the JMX Remote API that uses RMI to transmit client requests to a remote MBean server.
Provides classes for the secure socket package.
Provides interfaces and classes for I/O, sequencing, and synthesis of MIDI (Musical Instrument Digital Interface) data.
Provides interfaces and classes for capture, processing, and playback of sampled audio data.
Provides the API for server side data source access and processing from the Java programming language.
Standard interfaces and base classes for JDBC
RowSet implementations.The standard classes and interfaces that a third party vendor has to use in its implementation of a synchronization provider.
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
Provides interfaces for tools which can be invoked from a program, for example, compilers.
This package provides classes to create events and control Flight Recorder.
This package contains classes for consuming Flight Recorder data.
Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code.
Provides implementation support for building JShell execution engines.
Defines the Service Provider Interface for pluggable JShell execution engines.
This package contains classes to control and monitor Flight Recorder over Java Management Extensions (JMX).
Uses ofAutoCloseable incom.sun.net.httpserver
Classes incom.sun.net.httpserver that implementAutoCloseableModifier and TypeClassDescriptionclassThis class encapsulates a HTTP request received and a response to be generated in one exchange.classThis class encapsulates a HTTPS request received and a response to be generated in one exchange and defines the extensions toHttpExchangethat are specific to the HTTPS protocol.Uses ofAutoCloseable incom.sun.nio.sctp
Classes incom.sun.nio.sctp that implementAutoCloseableModifier and TypeClassDescriptionclassA selectable channel for message-oriented connected SCTP sockets.classA selectable channel for message-oriented SCTP sockets.classA selectable channel for message-oriented listening SCTP sockets.Uses ofAutoCloseable injava.beans
Classes injava.beans that implementAutoCloseableModifier and TypeClassDescriptionclassTheXMLDecoderclass is used to read XML documents created using theXMLEncoderand is used just like theObjectInputStream.classTheXMLEncoderclass is a complementary alternative to theObjectOutputStreamand can used to generate a textual representation of aJavaBean in the same way that theObjectOutputStreamcan be used to create binary representation ofSerializableobjects.Uses ofAutoCloseable injava.io
Subinterfaces ofAutoCloseable injava.ioModifier and TypeInterfaceDescriptioninterfaceACloseableis a source or destination of data that can be closed.interfaceObjectInput extends the DataInput interface to include the reading of objects.interfaceObjectOutput extends the DataOutput interface to include writing of objects.Classes injava.io that implementAutoCloseableModifier and TypeClassDescriptionclassABufferedInputStreamadds functionality to another input stream-namely, the ability to buffer the input and to support themarkandresetmethods.classThe class implements a buffered output stream.classReads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines.classWrites text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings.classAByteArrayInputStreamcontains an internal buffer that contains bytes that may be read from the stream.classThis class implements an output stream in which the data is written into a byte array.classThis class implements a character buffer that can be used as a character-input stream.classThis class implements a character buffer that can be used as a Writer.classA data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way.classA data output stream lets an application write primitive Java data types to an output stream in a portable way.classAFileInputStreamobtains input bytes from a file in a file system.classA file output stream is an output stream for writing data to aFileor to aFileDescriptor.classReads text from character files using a default buffer size.classWrites text to character files using a default buffer size.classAFilterInputStreamwraps some other input stream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.classThis class is the superclass of all classes that filter output streams.classAbstract class for reading filtered character streams.classAbstract class for writing filtered character streams.classThis abstract class is the superclass of all classes representing an input stream of bytes.classAn InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specifiedcharset.classDeprecated.This class incorrectly assumes that bytes adequately represent characters.classA buffered character-input stream that keeps track of line numbers.classAn ObjectInputStream deserializes primitive data and objects previously written using an ObjectOutputStream.classAn ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.classThis abstract class is the superclass of all classes representing an output stream of bytes.classAn OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are encoded into bytes using a specifiedcharset.classA 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.classA piped output stream can be connected to a piped input stream to create a communications pipe.classPiped character-input streams.classPiped character-output streams.classAPrintStreamadds functionality to another output stream, namely the ability to print representations of various data values conveniently.classPrints formatted representations of objects to a text-output stream.classAPushbackInputStreamadds functionality to another input stream, namely the ability to "push back" or "unread" bytes, by storing pushed-back bytes in an internal buffer.classA character-stream reader that allows characters to be pushed back into the stream.classInstances of this class support both reading and writing to a random access file.classAbstract class for reading character streams.classASequenceInputStreamrepresents the logical concatenation of other input streams.classDeprecated.This class does not properly convert characters into bytes.classA character stream whose source is a string.classA character stream that collects its output in a string buffer, which can then be used to construct a string.classAbstract class for writing to character streams.Uses ofAutoCloseable injava.lang.foreign
Subinterfaces ofAutoCloseable injava.lang.foreignUses ofAutoCloseable injava.lang.module
Subinterfaces ofAutoCloseable injava.lang.moduleModifier and TypeInterfaceDescriptioninterfaceProvides access to the content of a module.Uses ofAutoCloseable injava.net
Classes injava.net that implementAutoCloseableModifier and TypeClassDescriptionclassThis class represents a socket for sending and receiving datagram packets.classAMulticastSocketis a datagram socket that is convenient for sending and receiving IP multicast datagrams.classThis class implements server sockets.classThis class implements client sockets (also called just "sockets").classThis class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.Uses ofAutoCloseable injava.net.http
Classes injava.net.http that implementAutoCloseableUses ofAutoCloseable injava.nio.channels
Subinterfaces ofAutoCloseable injava.nio.channelsModifier and TypeInterfaceDescriptioninterfaceAn asynchronous channel that can read and write bytes.interfaceA channel that supports asynchronous I/O operations.interfaceA channel that can read and write bytes.interfaceA nexus for I/O operations.interfaceA channel that can write bytes from a sequence of buffers.interfaceA channel that can be asynchronously closed and interrupted.interfaceA network channel that supports Internet Protocol (IP) multicasting.interfaceA channel to a network socket.interfaceA channel that can read bytes.interfaceA channel that can read bytes into a sequence of buffers.interfaceA byte channel that maintains a currentposition and allows the position to be changed.interfaceA channel that can write bytes.Classes injava.nio.channels that implementAutoCloseableModifier and TypeClassDescriptionclassAn asynchronous channel for reading, writing, and manipulating a file.classAn asynchronous channel for stream-oriented listening sockets.classAn asynchronous channel for stream-oriented connecting sockets.classA selectable channel for datagram-oriented sockets.classA channel for reading, writing, mapping, and manipulating a file.classA token representing a lock on a region of a file.static classA channel representing the writable end of aPipe.static classA channel representing the readable end of aPipe.classA channel that can be multiplexed via aSelector.classA multiplexor ofSelectableChannelobjects.classA selectable channel for stream-oriented listening sockets.classA selectable channel for stream-oriented connecting sockets.Uses ofAutoCloseable injava.nio.channels.spi
Classes injava.nio.channels.spi that implementAutoCloseableModifier and TypeClassDescriptionclassBase implementation class for interruptible channels.classBase implementation class for selectable channels.classBase implementation class for selectors.Uses ofAutoCloseable injava.nio.file
Subinterfaces ofAutoCloseable injava.nio.fileModifier and TypeInterfaceDescriptioninterfaceAn object to iterate over the entries in a directory.interfaceADirectoryStreamthat defines operations on files that are located relative to an open directory.interfaceA watch service thatwatches registered objects for changes and events.Classes injava.nio.file that implementAutoCloseableModifier and TypeClassDescriptionclassProvides an interface to a file system and is the factory for objects to access files and other objects in the file system.Uses ofAutoCloseable injava.rmi.server
Classes injava.rmi.server that implementAutoCloseableUses ofAutoCloseable injava.security
Classes injava.security that implementAutoCloseableModifier and TypeClassDescriptionclassA transparent stream that updates the associated message digest using the bits going through the stream.classA transparent stream that updates the associated message digest using the bits going through the stream.Uses ofAutoCloseable injava.sql
Subinterfaces ofAutoCloseable injava.sqlModifier and TypeInterfaceDescriptioninterfaceThe interface used to execute SQL stored procedures.interfaceA connection (session) with a specific database.interfaceAn object that represents a precompiled SQL statement.interfaceA table of data representing a database result set, which is usually generated by executing a statement that queries the database.interfaceThe object used for executing a static SQL statement and returning the results it produces.Uses ofAutoCloseable injava.util
Classes injava.util that implementAutoCloseableUses ofAutoCloseable injava.util.concurrent
Subinterfaces ofAutoCloseable injava.util.concurrentModifier and TypeInterfaceDescriptioninterfaceinterfaceAnExecutorServicethat can schedule commands to run after a given delay, or to execute periodically.Classes injava.util.concurrent that implementAutoCloseableModifier and TypeClassDescriptionclassProvides default implementations ofExecutorServiceexecution methods.classAnExecutorServicefor runningForkJoinTasks.classAThreadPoolExecutorthat can additionally schedule commands to run after a given delay, or to execute periodically.classPreview.A basic API forstructured concurrency.static final classstatic final classPreview.classAFlow.Publisherthat asynchronously issues submitted (non-null) items to current subscribers until it is closed.classAnExecutorServicethat executes each submitted task using one of possibly several pooled threads, normally configured usingExecutorsfactory methods.Uses ofAutoCloseable injava.util.jar
Classes injava.util.jar that implementAutoCloseableModifier and TypeClassDescriptionclassTheJarFileclass is used to read the contents of a jar file from any file that can be opened withjava.io.RandomAccessFile.classTheJarInputStreamclass, which extendsZipInputStream, is used to read the contents of a JAR file from an input stream.classTheJarOutputStreamclass is used to write the contents of a JAR file to any output stream.Uses ofAutoCloseable injava.util.stream
Subinterfaces ofAutoCloseable injava.util.streamModifier and TypeInterfaceDescriptioninterfaceBaseStream<T,S extendsBaseStream<T, S>> Base interface for streams, which are sequences of elements supporting sequential and parallel aggregate operations.interfaceA sequence of primitive double-valued elements supporting sequential and parallel aggregate operations.interfaceA sequence of primitive int-valued elements supporting sequential and parallel aggregate operations.interfaceA sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.interfaceStream<T>A sequence of elements supporting sequential and parallel aggregate operations.Uses ofAutoCloseable injava.util.zip
Classes injava.util.zip that implementAutoCloseableModifier and TypeClassDescriptionclassAn input stream that also maintains a checksum of the data being read.classAn output stream that also maintains a checksum of the data being written.classImplements an input stream filter for compressing data in the "deflate" compression format.classThis class implements an output stream filter for compressing data in the "deflate" compression format.classThis class implements a stream filter for reading compressed data in the GZIP file format.classThis class implements a stream filter for writing compressed data in the GZIP file format.classThis class implements a stream filter for uncompressing data in the "deflate" compression format.classImplements an output stream filter for uncompressing data stored in the "deflate" compression format.classThis class is used to read entries from a zip file.classAn input stream for reading compressed and uncompressedZIP file entries from a stream of bytes in the ZIP file format.classThis class implements an output stream filter for writing files in the ZIP file format.Uses ofAutoCloseable injavax.crypto
Classes injavax.crypto that implementAutoCloseableModifier and TypeClassDescriptionclassACipherInputStreamis composed of anInputStreamand aCipherobject so that read() methods return data that are read in from the underlyingInputStreambut have been additionally processed by theCipherobject.classACipherOutputStreamis composed of anOutputStreamand aCipherobject so that write() methods first process the data before writing them out to the underlyingOutputStream.Uses ofAutoCloseable injavax.imageio.stream
Subinterfaces ofAutoCloseable injavax.imageio.streamModifier and TypeInterfaceDescriptioninterfaceA seekable input stream interface for use byImageReaders.interfaceA seekable output stream interface for use byImageWriters.Classes injavax.imageio.stream that implementAutoCloseableModifier and TypeClassDescriptionclassAn implementation ofImageInputStreamthat gets its input from a regularInputStream.classAn implementation ofImageOutputStreamthat writes its output to a regularOutputStream.classAn implementation ofImageInputStreamthat gets its input from aFileorRandomAccessFile.classAn implementation ofImageOutputStreamthat writes its output directly to aFileorRandomAccessFile.classAn abstract class implementing theImageInputStreaminterface.classAn abstract class implementing theImageOutputStreaminterface.classAn implementation ofImageInputStreamthat gets its input from a regularInputStream.classAn implementation ofImageOutputStreamthat writes its output to a regularOutputStream.Uses ofAutoCloseable injavax.management.loading
Classes injavax.management.loading that implementAutoCloseableModifier and TypeClassDescriptionclassDeprecated, for removal: This API element is subject to removal in a future version.This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans.classDeprecated, for removal: This API element is subject to removal in a future version.This API is part of Management Applets (m-lets), which is a legacy feature that allows loading of remote MBeans.Uses ofAutoCloseable injavax.management.remote
Subinterfaces ofAutoCloseable injavax.management.remoteUses ofAutoCloseable injavax.management.remote.rmi
Subinterfaces ofAutoCloseable injavax.management.remote.rmiModifier and TypeInterfaceDescriptioninterfaceRMI object used to forward an MBeanServer request from a client to its MBeanServer implementation on the server side.Classes injavax.management.remote.rmi that implementAutoCloseableModifier and TypeClassDescriptionclassImplementation of theRMIConnectioninterface.final classRMIConnectionImpl remote stub.classA connection to a remote RMI connector.classAnRMIServerobject that is exported through JRMP and that creates client connections as RMI objects exported through JRMP.classAn RMI object representing a connector server.Uses ofAutoCloseable injavax.net.ssl
Classes injavax.net.ssl that implementAutoCloseableModifier and TypeClassDescriptionclassThis class extendsServerSocketand provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.classThis class extendsSocketand provides secure sockets using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols.Uses ofAutoCloseable injavax.sound.midi
Subinterfaces ofAutoCloseable injavax.sound.midiModifier and TypeInterfaceDescriptioninterfaceMidiDeviceis the base interface for all MIDI devices.interfaceMidiDeviceReceiveris aReceiverwhich represents a MIDI input connector of aMidiDevice(seeMidiDevice.getReceiver()).interfaceMidiDeviceTransmitteris aTransmitterwhich represents a MIDI input connector of aMidiDevice(seeMidiDevice.getTransmitter()).interfaceAReceiverreceivesMidiEventobjects and typically does something useful in response, such as interpreting them to generate sound or raw MIDI output.interfaceA hardware or software device that plays back a MIDIsequenceis known as asequencer.interfaceASynthesizergenerates sound.interfaceUses ofAutoCloseable injavax.sound.sampled
Subinterfaces ofAutoCloseable injavax.sound.sampledModifier and TypeInterfaceDescriptioninterfaceTheClipinterface represents a special kind of data line whose audio data can be loaded prior to playback, instead of being streamed in real time.interfaceDataLineadds media-related functionality to its superinterface,Line.interfaceTheLineinterface represents a mono or multi-channel audio feed.interfaceA mixer is an audio device with one or more lines.interfacePorts are simple lines for input or output of audio to or from audio devices.interfaceA source data line is a data line to which data may be written.interfaceA target data line is a type ofDataLinefrom which audio data can be read.Classes injavax.sound.sampled that implementAutoCloseableModifier and TypeClassDescriptionclassAn audio input stream is an input stream with a specified audio format and length.Uses ofAutoCloseable injavax.sql
Subinterfaces ofAutoCloseable injavax.sqlModifier and TypeInterfaceDescriptioninterfaceThe interface that adds support to the JDBC API for the JavaBeans component model.Uses ofAutoCloseable injavax.sql.rowset
Subinterfaces ofAutoCloseable injavax.sql.rowsetModifier and TypeInterfaceDescriptioninterfaceThe interface that all standard implementations ofCachedRowSetmust implement.interfaceThe standard interface that all standard implementations ofFilteredRowSetmust implement.interfaceThe standard interface that all standard implementations ofJdbcRowSetmust implement.interfaceTheJoinRowSetinterface provides a mechanism for combining related data from differentRowSetobjects into oneJoinRowSetobject, which represents an SQLJOIN.interfaceThe standard interface that all implementations of aWebRowSetmust implement.Uses ofAutoCloseable injavax.sql.rowset.spi
Subinterfaces ofAutoCloseable injavax.sql.rowset.spiModifier and TypeInterfaceDescriptioninterfaceDefines a framework that allows applications to use a manual decision tree to decide what should be done when a synchronization conflict occurs.Uses ofAutoCloseable injavax.swing
Classes injavax.swing that implementAutoCloseableModifier and TypeClassDescriptionclassMonitors the progress of reading from some InputStream.Uses ofAutoCloseable injavax.tools
Subinterfaces ofAutoCloseable injavax.toolsModifier and TypeInterfaceDescriptioninterfaceFile manager for tools operating on Java programming language source and class files.interfaceFile manager based onjava.io.Fileandjava.nio.file.Path.Classes injavax.tools that implementAutoCloseableModifier and TypeClassDescriptionclassForwardingJavaFileManager<M extendsJavaFileManager>Forwards calls to a given file manager.Uses ofAutoCloseable injdk.jfr
Classes injdk.jfr that implementAutoCloseableModifier and TypeClassDescriptionfinal classProvides means to configure, start, stop and dump recording data to disk.Uses ofAutoCloseable injdk.jfr.consumer
Subinterfaces ofAutoCloseable injdk.jfr.consumerClasses injdk.jfr.consumer that implementAutoCloseableModifier and TypeClassDescriptionfinal classA recording file.final classA recording stream produces events from the current JVM (Java Virtual Machine).Uses ofAutoCloseable injdk.jshell
Classes injdk.jshell that implementAutoCloseableUses ofAutoCloseable injdk.jshell.execution
Classes injdk.jshell.execution that implementAutoCloseableModifier and TypeClassDescriptionclassAnExecutionControlimplementation that runs in the current process.classThe implementation ofExecutionControlthat the JShell-core uses by default.classAbstract JDI implementation ofExecutionControl.classAn implementation ofExecutionControlwhich executes in the same JVM as the JShell-core.classThe remote agent runs in the execution process (separate from the main JShell process).classAn implementation of theExecutionControlexecution engine SPI which streams requests to a remote agent where execution takes place.Uses ofAutoCloseable injdk.jshell.spi
Subinterfaces ofAutoCloseable injdk.jshell.spiModifier and TypeInterfaceDescriptioninterfaceThis interface specifies the functionality that must provided to implement a pluggable JShell execution engine.Uses ofAutoCloseable injdk.management.jfr
Classes injdk.management.jfr that implementAutoCloseableModifier and TypeClassDescriptionfinal classAn implementation of anEventStreamthat can serialize events over the network using anMBeanServerConnection.