Package org.eclipse.cdt.utils.som
Class AR
- java.lang.Object
-
- org.eclipse.cdt.utils.som.AR
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class AR extends java.lang.Object implements java.lang.AutoCloseableTheARclass is used for parsing standard SOM archive (ar) files.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAR.ARHeaderArchive and archive member header.classAR.LSTHeaderLibrary Symbol Table header
-
Constructor Summary
Constructors Constructor Description AR(java.lang.String filename)Creates a newARobject from the contents of the given file.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddispose()java.lang.String[]extractFiles(java.lang.String outdir)protected voidfinalize()AR.ARHeader[]getHeaders()Get an array of all the object file headers for this archive.protected java.io.RandomAccessFilegetRandomAccessFile()static booleanisARHeader(byte[] ident)static voidmain(java.lang.String[] args)java.lang.StringtoString()
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
dispose
public void dispose()
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
isARHeader
public static boolean isARHeader(byte[] ident)
-
getRandomAccessFile
protected java.io.RandomAccessFile getRandomAccessFile() throws java.io.IOException- Throws:
java.io.IOException
-
getHeaders
public AR.ARHeader[] getHeaders() throws java.io.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:
java.io.IOException- Unable to process the archive file.- See Also:
AR.ARHeader
-
extractFiles
public java.lang.String[] extractFiles(java.lang.String outdir) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
main
public static void main(java.lang.String[] args)
-
-