At4J Programmer's Guide

Karl Gustafsson

Revision History
Revision 1.02009-02-07

Table of Contents

1. Introduction
Please help!
License and Copyright
Support
2. Getting started
Requirements
Downloading At4J
Installing At4J
Running unit tests (optional)
3. Data compression
Utilities
Which compression method is best?
4. bzip2 compression
bzip2 utilities
Standalone bzip2 tools
5. gzip compression
Standalone gzip tools
6. LZMA compression
Standalone LZMA tools
7. Archives
Reading archives
Extracting entries
Creating archives
Determining the metadata for an entry
8. Tar
Character encoding in Tar files
Significant Tar features not supported by At4J
Reading Tar archives
Extracting entries from Tar archives
Creating Tar archives
Standalone Tar tools
9. Zip
Character encoding in Zip files
Significant Zip features not supported by At4J
Reading Zip archives
Extracting from Zip archives
Creating Zip archives
Adding support for unsupported features
Adding a new compression method
Adding a new external attribute type
Adding a new extra field type
Standalone Zip tools
Bibliography

List of Tables

3.1. Useful EntityFS classes
3.2. Compression methods
8.1. Tar entry objects

List of Examples

3.1. Compressing and decompressing with bzip2
3.2. Compressing and decompressing with bzip2 using EntityFS utilities
4.1. Compressing and decompressing with bzip2
4.2. Compressing and decompressing with bzip2 using several encoder threads
4.3. Compressing and decompressing with bzip2 using At4J readable and writable bzip2 files
5.1. Working with gzip using readable and writable gzip files
6.1. Compressing and decompressing with LZMA
6.2. Compressing and decompressing with LZMA using manual configuration
6.3. Compressing and decompressing with LZMA using At4J readable and writable LZMA files
7.1. Extracting files from a Zip file using the archive extractor
8.1. Reading data from a Tar archive
8.2. Reading a pax variable for an entry
8.3. Extracting Java source files from a Tar archive
8.4. Build a Tar archive using the Tar builder
8.5. Build a Tar archive using the Tar stream builder
9.1. Reading data from a Zip archive
9.2. Reading metadata from a Zip entry
9.3. Building a Zip archive
9.4. Build a Zip archive and set the compression level