Java Reference
In-Depth Information
You can also get a URL object ( URL class is in java.net package) for an entry in your JAR file, which is in your
classpath as follows:
URL url = cls.getResource("/images/logo.bmp");
Summary
An archive file consists of one or more files. Optionally, the files in an archive file may be compressed. It also contains
metadata that may include the directory structure of the files, comments, error detection and recovery information,
etc. An archive file may be encrypted as well.
A checksum is a number that is computed by applying an algorithm on a stream of bytes. Typically, it is used
when data is transmitted across the network to check for errors during data transmission. The sender and receiver
use the same algorithm to compute the checksum for the transmitted data. A mismatch signals an error in data
transmission. Java contains Adler32 and CRC32 classes to compute checksum for data using the Adler32 and
CRC32 algorithms, respectively. Java provides Deflater and Inflater classes to work with data compression and
decompression.
The JDK supports creating and manipulating archive files in ZIP, GZIP, and JAR formats through APIs and tools.
The APIs are in the java.util.zip and java.util.jar packages. In addition to the JAR API to work with JAR files, the
JDK provides a jar command-line tool that can be used create, read, and update JAR files.
 
Search WWH ::




Custom Search