o[i] = obj; size++;
}
public Object set(int i, Object obj) {
- if (i >= size) throw new IndexOutOfBoundsException(
+ if (i >= o.length) throw new IndexOutOfBoundsException(
"index "+i+" is beyond list boundary "+size);
- Object old = o[i]; o[i] = obj; return old;
+ Object old = o[i]; o[i] = obj;
+ size = Math.max(i+1, size);
+ return old;
}
public Object get(int i) {
if (i >= size) throw new IndexOutOfBoundsException(
if (ze == null) break;
if (ze.getName().equals(path)) return zis;
}
- return null;
+ throw new RuntimeException("could not find file within archive");
} else {
Tar.TarInputStream tis = new Tar.TarInputStream(new GZIPInputStream(rest));
while(true) {
if (te == null) break;
if (te.getName().equals(path)) return tis;
}
- return null;
+ throw new RuntimeException("could not find file within archive");
}
} else {
URL u = new URL(url);