Added in API level 19

AutoCloseable

interface AutoCloseable
AssetManager

Provides access to an application's raw asset files; see Resources for the way most applications will want to retrieve their resource data.

BaseStream

Base interface for streams, which are sequences of elements supporting sequential and parallel aggregate operations.

BluetoothCsipSetCoordinator

This class provides the public APIs to control the Bluetooth CSIP set coordinator.

BluetoothLeAudio

This class provides the public APIs to control the LeAudio profile.

BundleSession

An instances of this class represents a session with data stored in a bundle.

CameraCaptureSession

A configured capture session for a CameraDevice, used for capturing images from the camera or reprocessing images captured from the camera in the same session previously.

CameraDevice

The CameraDevice class is a representation of a single camera connected to an Android device, allowing for fine-grain control of image capture and post-processing at high frame rates.

CameraExtensionSession

A camera capture session that enables access to device-specific camera extensions, which often use multi-frame bursts and sophisticated post-process algorithms for image capture.

Closeable

A Closeable is a source or destination of data that can be closed.

Connection

A connection (session) with a specific database.

ContentCaptureSession

Session used when notifying the Android system about events associated with views.

ContentProviderClient

The public interface object used to interact with a specific ContentProvider.

DiscoverySession

A class representing a single publish or subscribe Aware session.

DngCreator

The DngCreator class provides functions to write raw pixel data as a DNG file.

DrmManagerClient

The main programming interface for the DRM framework.

EditingSession

Represents a session of media editing, for example, transcoding between formats, transmuxing or applying trimming or audio/video effects to a stream.

ExecutorService

An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.

FileLock

A token representing a lock on a region of a file.

GroupCall

Class used to represent a single MBMS group call.

HapticGenerator

Haptic Generator(HG).

HardwareBuffer

HardwareBuffer wraps a native AHardwareBuffer object, which is a low-level object representing a memory buffer accessible by various hardware units.

HardwareBufferRenderer

Creates an instance of a hardware-accelerated renderer.

IkeSession

This class represents an IKE Session management object that allows for keying and management of android.net.IpSecTransforms.

Image

A single complete image buffer to use with a media source such as a MediaCodec or a CameraDevice.

ImageDecoder

A class for converting encoded images (like PNG, JPEG, WEBP, GIF, or HEIF) into Drawable or Bitmap objects.

ImageReader

The ImageReader class allows direct application access to image data rendered into a android.view.Surface

ImageWriter

The ImageWriter class allows an application to produce Image data into a android.view.Surface, and have it be consumed by another component like CameraDevice.

IpSecManager.SecurityParameterIndex

This class represents a reserved SPI.

IpSecManager.UdpEncapsulationSocket

This class provides access to a UDP encapsulation Socket.

IpSecTransform

This class represents a transform, which roughly corresponds to an IPsec Security Association.

LightsManager.LightsSession

Encapsulates a session that can be used to control device lights and represents the lifetime of the requests.

LoudnessCodecController

Class for getting recommended loudness parameter updates for audio decoders as they are used to play back media content according to the encoded format and current audio routing.

MbmsDownloadSession

This class provides functionality for file download over MBMS.

MbmsGroupCallSession

This class provides functionality for accessing group call functionality over MBMS.

MbmsStreamingSession

This class provides functionality for streaming media over MBMS.

MediaCas

MediaCas can be used to obtain keys for descrambling protected media streams, in conjunction with android.media.MediaDescrambler.

MediaCas.Session

Class for an open session with the CA system.

MediaController2

This API is not generally intended for third party application developers.

MediaDescrambler

MediaDescrambler class can be used in conjunction with android.media.MediaCodec and android.media.MediaExtractor to decode media data scrambled by conditional access (CA) systems such as those in the ISO/IEC13818-1.

MediaDrm

MediaDrm can be used to obtain keys for decrypting protected media streams, in conjunction with android.media.MediaCrypto.

MediaMetadataRetriever

MediaMetadataRetriever class provides a unified interface for retrieving frame and meta data from an input media file.

MediaSession2

This API is not generally intended for third party application developers.

MultiResolutionImageReader

The MultiResolutionImageReader class wraps a group of ImageReaders with the same format and different sizes, source camera Id, or camera sensor modes.

NetworkStats

Class providing enumeration over buckets of network usage statistics.

ObjectInput

ObjectInput extends the DataInput interface to include the reading of objects.

ObjectOutput

ObjectOutput extends the DataOutput interface to include writing of objects.

PdfRenderer

This class enables rendering a PDF document and selecting, searching, fast scrolling, annotations, etc.

PdfRenderer.Page

This class represents a PDF document page for rendering.

PdfRendererPreV

This class enables rendering a PDF document and selecting, searching, fast scrolling, annotations, etc from Android R till Android U.

PdfRendererPreV.Page

This class represents a PDF document page for rendering.

PlaybackSession

An instance of this class represents a session of media playback used to report playback metrics and events.

RangingSession

Represents a session for performing ranging operations.

RecordingSession

An instances of this class represents a session of media recording.

ResourcesProvider

Provides methods to load resources data from APKs (.apk) and resources tables (eg.

ResultSet

A table of data representing a database result set, which is usually generated by executing a statement that queries the database.

SQLiteOpenHelper

A helper class to manage database creation and version management.

SettingsPreferenceServiceClient

Client class responsible for binding to and interacting with an instance of SettingsPreferenceService.

SocketKeepalive

Allows applications to request that the system periodically send specific packets on their behalf, using hardware offload to save battery power.

Statement

The object used for executing a static SQL statement and returning the results it produces.

StreamingService

Class used to represent a single MBMS stream.

SubmissionPublisher

A Flow.Publisher that asynchronously issues submitted (non-null) items to current subscribers until it is closed.

SyncFence

A SyncFence represents a synchronization primitive which signals when hardware units have completed work on a particular resource.

TranscodingSession

An instances of this class represents a session of media Transcoding.

TransportHandle

TransportHandle is used as the Out-Of-Band (OOB) transport mechanism by ranging module.

TypedArray

Container for an array of values that were retrieved with Resources.Theme.obtainStyledAttributes(AttributeSet, int[], int, int) or Resources.obtainAttributes.

VolumeShaper

The VolumeShaper class is used to automatically control audio volume during media playback, allowing simple implementation of transition effects and ducking.

WifiAwareSession

This class represents a Wi-Fi Aware session - an attachment to the Wi-Fi Aware service through which the app can execute discovery operations.

WifiManager.LocalOnlyHotspotReservation

LocalOnlyHotspotReservation that contains the SoftApConfiguration for the active LocalOnlyHotspot request.

WifiP2pManager.Channel

A channel that connects the application to the Wifi p2p framework.

XmlResourceParser

The XML parsing interface returned for an XML resource.

AbstractCursor

This is an abstract cursor class that handles a lot of the common code that all cursors need to deal with and is provided for convenience reasons.

AbstractExecutorService

Provides default implementations of ExecutorService execution methods.

AbstractInterruptibleChannel

Base implementation class for interruptible channels.

AbstractInterruptibleChannel

Base implementation class for interruptible channels.

AbstractSelectableChannel

Base implementation class for selectable channels.

AbstractSelectableChannel

Base implementation class for selectable channels.

AbstractSelectableChannel

Base implementation class for selectable channels.

AbstractSelector

Base implementation class for selectors.

AbstractWindowedCursor

A base class for Cursors that store their data in CursorWindows.

AppSearchSession

Provides a connection to a single AppSearch database.

AssetFileDescriptor

File descriptor of an entry in the AssetManager.

AssetFileDescriptor.AutoCloseInputStream

An InputStream you can create on a ParcelFileDescriptor, which will take care of calling android.

AssetFileDescriptor.AutoCloseOutputStream

An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling android.

AssetManager.AssetInputStream

AsynchronousByteChannel

An asynchronous channel that can read and write bytes.

AsynchronousChannel

A channel that supports asynchronous I/O operations.

AsynchronousFileChannel

An asynchronous channel for reading, writing, and manipulating a file.

AsynchronousServerSocketChannel

An asynchronous channel for stream-oriented listening sockets.

AsynchronousServerSocketChannel

An asynchronous channel for stream-oriented listening sockets.

AsynchronousSocketChannel

An asynchronous channel for stream-oriented connecting sockets.

AsynchronousSocketChannel

An asynchronous channel for stream-oriented connecting sockets.

BackupDataInputStream

Provides an java.io.InputStream-like interface for accessing an entity's data during a restore operation.

Base64InputStream

An InputStream that does Base64 decoding on the data read through it.

Base64OutputStream

An OutputStream that does Base64 encoding on the data written to it, writing the resulting data to another OutputStream.

BlobStoreManager.Session

Represents an ongoing session of a blob's contribution to the blob store managed by the system.

BluetoothServerSocket

A listening Bluetooth socket.

BluetoothSocket

A connected or connecting Bluetooth socket.

BufferedInputStream

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

BufferedOutputStream

The class implements a buffered output stream.

BufferedReader

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

BufferedWriter

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

ByteArrayInputStream

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

ByteArrayOutputStream

This class implements an output stream in which the data is written into a byte array.

ByteChannel

A channel that can read and write bytes.

ByteChannel

A channel that can read and write bytes.

CallableStatement

The interface used to execute SQL stored procedures.

CameraConstrainedHighSpeedCaptureSession

A constrained high speed capture session for a CameraDevice, used for capturing high speed images from the CameraDevice for high speed video recording use case.

CameraOfflineSession

A camera capture session that was switched to offline mode via successful call to CameraCaptureSession.switchToOffline.

Channel

A nexus for I/O operations.

Channel

Instances of this class represent an ISO/IEC 7816-4 channel opened to a Secure Element.

CharArrayReader

This class implements a character buffer that can be used as a character-input stream.

CharArrayWriter

This class implements a character buffer that can be used as an Writer.

CheckedInputStream

An input stream that also maintains a checksum of the data being read.

CheckedOutputStream

An output stream that also maintains a checksum of the data being written.

CipherInputStream

A CipherInputStream is composed of an InputStream and a Cipher so that read() methods return data that are read in from the underlying InputStream but have been additionally processed by the Cipher.

CipherOutputStream

A CipherOutputStream is composed of an OutputStream and a Cipher so that write() methods first process the data before writing them out to the underlying OutputStream.

CrossProcessCursor

A cross process cursor is an extension of a Cursor that also supports usage from remote processes.

CrossProcessCursorWrapper

Cursor wrapper that implements CrossProcessCursor.

CrossProcessCursorWrapper

Cursor wrapper that implements CrossProcessCursor.

Cursor

This interface provides random read-write access to the result set returned by a database query.

CursorWindow

A buffer containing multiple cursor rows.

CursorWrapper

Wrapper class for Cursor that delegates all calls to the actual cursor object.

DataInputStream

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

DataOutputStream

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

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramChannel

A selectable channel for datagram-oriented sockets.

DatagramSocket

This class represents a socket for sending and receiving datagram packets.

DeflaterInputStream

Implements an input stream filter for compressing data in the "deflate" compression format.

DeflaterOutputStream

This class implements an output stream filter for compressing data in the "deflate" compression format.

DigestInputStream

A transparent stream that updates the associated message digest using the bits going through the stream.

DigestOutputStream

A transparent stream that updates the associated message digest using the bits going through the stream.

DirectoryStream

An object to iterate over the entries in a directory.

DoubleStream

A sequence of primitive double-valued elements supporting sequential and parallel aggregate operations.

DropBoxManager.Entry

A single entry retrieved from the drop box.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileChannel

A channel for reading, writing, mapping, and manipulating a file.

FileInputStream

A FileInputStream obtains input bytes from a file in a file system.

FileOutputStream

A file output stream is an output stream for writing data to a File or to a FileDescriptor.

FileReader

Reads text from character files using a default buffer size.

FileSystem

Provides an interface to a file system and is the factory for objects to access files and other objects in the file system.

FileWriter

Writes text to character files using a default buffer size.

FilterInputStream

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.

FilterOutputStream

This class is the superclass of all classes that filter output streams.

FilterReader

Abstract class for reading filtered character streams.

FilterWriter

Abstract class for writing filtered character streams.

ForkJoinPool

An ExecutorService for running ForkJoinTasks.

Formatter

An interpreter for printf-style format strings.

GZIPInputStream

This class implements a stream filter for reading compressed data in the GZIP file format.

GZIPOutputStream

This class implements a stream filter for writing compressed data in the GZIP file format.

GatheringByteChannel

A channel that can write bytes from a sequence of buffers.

GlobalSearchSession

Provides a connection to all AppSearch databases the querying application has been granted access to.

HttpResponseCache

Caches HTTP and HTTPS responses to the filesystem so they may be reused, saving time and bandwidth.

InflaterInputStream

This class implements a stream filter for uncompressing data in the "deflate" compression format.

InflaterOutputStream

Implements an output stream filter for uncompressing data stored in the "deflate" compression format.

InputStream

This abstract class is the superclass of all classes representing an input stream of bytes.

InputStreamReader

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

IntStream

A sequence of primitive int-valued elements supporting sequential and parallel aggregate operations.

InterruptibleChannel

A channel that can be asynchronously closed and interrupted.

IsoDep

Provides access to ISO-DEP (ISO 14443-4) properties and I/O operations on a Tag.

JarFile

The JarFile class is used to read the contents of a jar file from any file that can be opened with java.io.RandomAccessFile.

JarInputStream

The JarInputStream class is used to read the contents of a JAR file from any input stream.

JarOutputStream

The JarOutputStream class is used to write the contents of a JAR file to any output stream.

JsonReader

Reads a JSON (RFC 4627) encoded value as a stream of tokens.

JsonWriter

Writes a JSON (RFC 4627) encoded value to a stream, one token at a time.

LineNumberInputStream

This class is an input stream filter that provides the added functionality of keeping track of the current line number.

LineNumberReader

A buffered character-input stream that keeps track of line numbers.

LocalServerSocket

Non-standard class for creating an inbound UNIX-domain socket in the Linux abstract namespace.

LocalSocket

Creates a (non-server) socket in the UNIX-domain namespace.

LongStream

A sequence of primitive long-valued elements supporting sequential and parallel aggregate operations.

MatrixCursor

A mutable cursor implementation backed by an array of Objects.

MediaDataSource

For supplying media data to the framework.

MergeCursor

A convenience class that lets you present an array of Cursors as a single linear Cursor.

MidiDevice

This class is used for sending and receiving data to and from a MIDI device Instances of this class are created by MidiManager.openDevice.

MidiDevice.MidiConnection

This class represents a connection between the output port of one device and the input port of another.

MidiInputPort

This class is used for sending data to a port on a MIDI device

MidiOutputPort

This class is used for receiving data from a port on a MIDI device

MifareClassic

Provides access to MIFARE Classic properties and I/O operations on a Tag.

MifareUltralight

Provides access to MIFARE Ultralight properties and I/O operations on a Tag.

MockCursor

A mock android.database.Cursor class that isolates the test code from real Cursor implementation.

MulticastChannel

A network channel that supports Internet Protocol (IP) multicasting.

MulticastSocket

The multicast datagram socket class is useful for sending and receiving IP multicast packets.

Ndef

Provides access to NDEF content and operations on a Tag.

NdefFormatable

Provide access to NDEF format operations on a Tag.

NetworkChannel

A channel to a network socket.

NfcA

Provides access to NFC-A (ISO 14443-3A) properties and I/O operations on a Tag.

NfcB

Provides access to NFC-B (ISO 14443-3B) properties and I/O operations on a Tag.

NfcBarcode

Provides access to tags containing just a barcode.

NfcF

Provides access to NFC-F (JIS 6319-4) properties and I/O operations on a Tag.

NfcV

Provides access to NFC-V (ISO 15693) properties and I/O operations on a Tag.

ObjectInputStream

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

ObjectInputStream

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

ObjectOutputStream

An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.

ObjectOutputStream

An ObjectOutputStream writes primitive data types and graphs of Java objects to an OutputStream.

OpenBlobForReadResponse

The response to provide batch operation results of AppSearchSession.openBlobForRead.

OpenBlobForWriteResponse

The response to provide batch operation results of AppSearchSession.openBlobForWrite.

OutputStream

This abstract class is the superclass of all classes representing an output stream of bytes.

OutputStreamWriter

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

PackageInstaller.Session

An installation that is being actively staged.

ParcelFileDescriptor

The FileDescriptor returned by Parcel.readFileDescriptor, allowing you to close it when done with it.

ParcelFileDescriptor.AutoCloseInputStream

An InputStream you can create on a ParcelFileDescriptor, which will take care of calling android.

ParcelFileDescriptor.AutoCloseOutputStream

An OutputStream you can create on a ParcelFileDescriptor, which will take care of calling android.

PerformanceHintManager.Session

A Session represents a group of threads with an inter-related workload such that hints for their performance should be considered as a unit.

Pipe.SinkChannel

A channel representing the writable end of a Pipe.

Pipe.SinkChannel

A channel representing the writable end of a Pipe.

Pipe.SinkChannel

A channel representing the writable end of a Pipe.

Pipe.SinkChannel

A channel representing the writable end of a Pipe.

Pipe.SinkChannel

A channel representing the writable end of a Pipe.

Pipe.SourceChannel

A channel representing the readable end of a Pipe.

Pipe.SourceChannel

A channel representing the readable end of a Pipe.

Pipe.SourceChannel

A channel representing the readable end of a Pipe.

Pipe.SourceChannel

A channel representing the readable end of a Pipe.

Pipe.SourceChannel

A channel representing the readable end of a Pipe.

PipedInputStream

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.

PipedOutputStream

A piped output stream can be connected to a piped input stream to create a communications pipe.

PipedReader

Piped character-input streams.

PipedWriter

Piped character-output streams.

PreparedStatement

An object that represents a precompiled SQL statement.

PrintStream

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

PrintStream

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

PrintWriter

Prints formatted representations of objects to a text-output stream.

PublishDiscoverySession

A class representing a Aware publish session.

PushbackInputStream

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.

PushbackReader

A character-stream reader that allows characters to be pushed back into the stream.

RandomAccessFile

Instances of this class support both reading and writing to a random access file.

ReadableByteChannel

A channel that can read bytes.

Reader

Abstract class for reading character streams.

ResourcesProvider

Provides methods to load resources data from APKs (.apk) and resources tables (eg.

RowSet

The interface that adds support to the JDBC API for the JavaBeansTM component model.

SQLiteClosable

An object created from a SQLiteDatabase that can be closed.

SQLiteCursor

A Cursor implementation that exposes results from a query on a SQLiteDatabase.

SQLiteDatabase

Exposes methods to manage a SQLite database.

SQLiteProgram

A base class for compiled SQLite programs.

SQLiteQuery

Represents a query that reads the resulting rows into a SQLiteQuery.

SQLiteRawStatement

A represents a SQLite prepared statement.

SQLiteStatement

Represents a statement that can be executed against a database.

SSLServerSocket

This class extends ServerSockets and provides secure server sockets using protocols such as the Secure Sockets Layer (SSL) or Transport Layer Security (TLS) protocols.

SSLSocket

This class extends Sockets and provides secure socket using protocols such as the "Secure Sockets Layer" (SSL) or IETF "Transport Layer Security" (TLS) protocols.

Scanner

A simple text scanner which can parse primitive types and strings using regular expressions.

ScatteringByteChannel

A channel that can read bytes into a sequence of buffers.

ScheduledExecutorService

An ExecutorService that can schedule commands to run after a given delay, or to execute periodically.

ScheduledThreadPoolExecutor

A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically.

ScheduledThreadPoolExecutor

A ThreadPoolExecutor that can additionally schedule commands to run after a given delay, or to execute periodically.

SearchResults

Encapsulates results of a search operation.

SecureDirectoryStream

A DirectoryStream that defines operations on files that are located relative to an open directory.

SeekableByteChannel

A byte channel that maintains a current position and allows the position to be changed.

SeekableByteChannel

A byte channel that maintains a current position and allows the position to be changed.

SelectableChannel

A channel that can be multiplexed via a Selector.

SelectableChannel

A channel that can be multiplexed via a Selector.

SelectableChannel

A channel that can be multiplexed via a Selector.

Selector

A multiplexor of SelectableChannel objects.

SensorDirectChannel

Class representing a sensor direct channel.

SequenceInputStream

A SequenceInputStream represents the logical concatenation of other input streams.

ServerSocket

This class implements server sockets.

ServerSocketChannel

A selectable channel for stream-oriented listening sockets.

ServerSocketChannel

A selectable channel for stream-oriented listening sockets.

ServerSocketChannel

A selectable channel for stream-oriented listening sockets.

ServerSocketChannel

A selectable channel for stream-oriented listening sockets.

SharedMemory

SharedMemory enables the creation, mapping, and protection control over anonymous shared memory.

Socket

This class implements client sockets (also called just "sockets").

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

SocketChannel

A selectable channel for stream-oriented connecting sockets.

Stream

A sequence of elements supporting sequential and parallel aggregate operations.

StringBufferInputStream

This class allows an application to create an input stream in which the bytes read are supplied by the contents of a string.

StringReader

A character stream whose source is a string.

StringWriter

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

SubscribeDiscoverySession

A class representing a Aware subscribe session.

SurfaceControl.Transaction

An atomic set of changes to a set of SurfaceControl.

TagTechnology

is an interface to a technology in a Tag

ThreadPoolExecutor

An ExecutorService that executes each submitted task using one of possibly several pooled threads, normally configured using Executors factory methods.

URLClassLoader

This class loader is used to load classes and resources from a search path of URLs referring to both JAR files and directories.

UploadDataProvider

Abstract class allowing the embedder to provide an upload body to UrlRequest.

WatchService

A watch service that watches registered objects for changes and events.

WritableByteChannel

A channel that can write bytes.

Writer

Abstract class for writing to character streams.

ZipFile

This class is used to read entries from a zip file.

ZipInputStream

This class implements an input stream filter for reading files in the ZIP file format.

ZipOutputStream

This class implements an output stream filter for writing files in the ZIP file format.

An object that may hold resources (such as file or socket handles) until it is closed. The close() method of an AutoCloseable object is called automatically when exiting a try-with-resources block for which the object has been declared in the resource specification header. This construction ensures prompt release, avoiding resource exhaustion exceptions and errors that may otherwise occur.

Summary

Public methods
abstract Unit

Closes this resource, relinquishing any underlying resources.

Public methods

close

Added in API level 19
abstract fun close(): Unit

Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try-with-resources statement.

Exceptions
java.lang.Exception if this resource cannot be closed