Package org.eclipse.cdt.utils.som
Class AR
- java.lang.Object
-
- org.eclipse.cdt.utils.som.AR
-
- All Implemented Interfaces:
AutoCloseable
public class AR extends Object implements AutoCloseable
TheAR
class is used for parsing standard SOM archive (ar) files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AR.ARHeader
Archive and archive member header.class
AR.LSTHeader
Library Symbol Table header
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
dispose()
String[]
extractFiles(String outdir)
protected void
finalize()
AR.ARHeader[]
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)
String
toString()
-
-
-
Field Detail
-
NL
public static final String NL
-
filename
protected String filename
-
file
protected RandomAccessFile file
-
-
Constructor Detail
-
AR
public AR(String filename) throws IOException
Creates a newAR
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
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
dispose
public void dispose()
-
finalize
protected void finalize() throws Throwable
-
isARHeader
public static boolean isARHeader(byte[] ident)
-
getRandomAccessFile
protected RandomAccessFile getRandomAccessFile() throws IOException
- Throws:
IOException
-
getHeaders
public AR.ARHeader[] 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) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args)
-
-