Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/BinaryArchive.java')
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/BinaryArchive.java68
1 files changed, 0 insertions, 68 deletions
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/BinaryArchive.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/BinaryArchive.java
deleted file mode 100644
index 7a1f10cdc33..00000000000
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/BinaryArchive.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2004 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.utils.coff.parser;
-
-
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.IBinaryParser;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryArchive;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.utils.BinaryFile;
-import org.eclipse.cdt.utils.coff.PEArchive;
-import org.eclipse.core.runtime.IPath;
-
-/**
- */
-public class BinaryArchive extends BinaryFile implements IBinaryArchive {
-
- ArrayList children;
-
- public BinaryArchive(IBinaryParser parser, IPath path) throws IOException {
- super(parser, path);
- new PEArchive(path.toOSString()).dispose(); // check file type
- children = new ArrayList(5);
- }
-
- /**
- * @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryArchive#getObjects()
- */
- public IBinaryObject[] getObjects() {
- if (hasChanged()) {
- children.clear();
- PEArchive ar = null;
- try {
- ar = new PEArchive(getPath().toOSString());
- PEArchive.ARHeader[] headers = ar.getHeaders();
- for (int i = 0; i < headers.length; i++) {
- IBinaryObject bin = new ARMember(getBinaryParser(), path, headers[i]);
- children.add(bin);
- }
- } catch (IOException e) {
- //e.printStackTrace();
- }
- if (ar != null) {
- ar.dispose();
- }
- children.trimToSize();
- }
- return (IBinaryObject[])children.toArray(new IBinaryObject[0]);
- }
-
- /**
- * @see org.eclipse.cdt.core.model.IBinaryParser.IBinaryFile#getType()
- */
- public int getType() {
- return IBinaryFile.ARCHIVE;
- }
-}

Back to the top