org.eclipse.cdt.utils.xcoff

## Class AR

- java.lang.Object
- - org.eclipse.cdt.utils.xcoff.AR

    public class AR
    extends Object

The `AR` class is used for parsing standard XCOFF32 archive (ar) files. Each object within the archive is represented by an ARHeader class. Each of of these objects can then be turned into an XCOFF32 object for performing XCOFF32 class operations.

See Also:
  `AR.MemberHeader`

### Nested Class Summary

Nested Classes
`class` `AR.ARHeader` Content of an archive in AIX XCOFF32 format
`class` `AR.MemberHeader` The `ARHeader` class is used to store the per-object file archive headers.

### Field Summary

Fields
`protected String` `filename`

### Constructor Summary

Constructors
Constructor and Description
`AR(String filename)` Creates a new `AR` object from the contents of the given file.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`void` `dispose()`
`String[]` `extractFiles(String outdir)`
`String[]` `extractFiles(String outdir, String[] names)`
`protected void` `finalize()`
`AR.MemberHeader[]` `getHeaders()` Get an array of all the object file headers for this archive.
`protected RandomAccessFile` `getRandomAccessFile()`
`static boolean` `isARHeader(byte[] ident)`
`static void` `main(String[] args)`
`protected String` `removeBlanks(String str)` Remove the padding from the archive header strings.

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### filename

    protected String filename

### Constructor Detail

#### AR

    public AR(String filename)
       throws IOException

Creates a new `AR` object from the contents of the given file.

Parameters:
  `filename` - The file to process.
Throws:
  `IOException` - The file is not a valid archive.

### Method Detail

#### dispose

    public void dispose()

#### finalize

    protected void finalize()
                     throws Throwable

Overrides:
  `finalize` in class `Object`
Throws:
  `Throwable`

#### isARHeader

    public static boolean isARHeader(byte[] ident)

#### getHeaders

    public AR.MemberHeader[] getHeaders()
                                 throws IOException

Get an array of all the object file headers for this archive.

Returns:
  An array of headers, one for each object within the archive.
Throws:
  `IOException` - Unable to process the archive file.
See Also:
  `AR.ARHeader`

#### extractFiles

    public String[] extractFiles(String outdir,
                                 String[] names)
                          throws IOException

Throws:
  `IOException`

#### removeBlanks

    protected String removeBlanks(String str)

Remove the padding from the archive header strings.

#### extractFiles

    public String[] extractFiles(String outdir)
                          throws IOException

Throws:
  `IOException`

#### getRandomAccessFile

    protected RandomAccessFile getRandomAccessFile()
                                            throws IOException

Throws:
  `IOException`

#### main

    public static void main(String[] args)