fix ThreadPool bug
[org.ibex.util.git] / src / org / ibex / util / CAB.java
index a8d7e0b..c8baaf0 100644 (file)
@@ -1,9 +1,6 @@
-// Copyright (C) 2003 Adam Megacz <adam@ibex.org> all rights reserved.
-//
-// You may modify, copy, and redistribute this code under the terms of
-// the GNU Library Public License version 2.1, with the exception of
-// the portion of clause 6a after the semicolon (aka the "obnoxious
-// relink clause")
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
 
 package org.ibex.util;
 
@@ -11,7 +8,8 @@ import java.io.*;
 import java.util.*;
 import java.util.zip.*;
 
-/** Reads a CAB file structure */
+/** Reads a CAB file structure.
+ *  @author FIXME */
 public class CAB {
 
     /** reads a CAB file, parses it, and returns an InputStream representing the named file */
@@ -48,7 +46,7 @@ public class CAB {
         for(int i=0; i<h.folders.length; i++) {
             InputStream is2 = new CFFOLDERInputStream(h.folders[i], dis);
             for(int j=0; j<h.folders[i].files.size(); j++) {
-                CFFILE file = (CFFILE)h.folders[i].files.elementAt(j);
+                CFFILE file = (CFFILE)h.folders[i].files.get(j);
                 if (file.fileName.equals(fileName)) return new LimitStream(is2, file.fileSize);
                 byte[] b = new byte[file.fileSize];
             }
@@ -247,7 +245,7 @@ public class CAB {
         int      compressionType = 0;           // compression type for this folder
         byte[]   reservedArea = null;           // per-folder reserved area
         int      indexInCFHEADER = 0;           // our index in CFHEADER.folders
-        Vector   files = new Vector();
+        Basket.List files = new Basket.Array();
 
         private CFHEADER header = null;
 
@@ -357,7 +355,7 @@ public class CAB {
             indexInCFHEADER = header.readCFFILEs++;
             header.files[indexInCFHEADER] = this;
             folder = header.folders[folderIndex];
-            folder.files.addElement(this);
+            folder.files.add(this);
         }
     }