import java.io.File;
import java.io.ObjectOutputStream;
+import java.io.RandomAccessFile;
+import java.util.jar.JarFile;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
av = new File(args[0]);
else
av = new File("test/vamsas.zip");
+ try {
+ RandomAccessFile raf = new RandomAccessFile(av, "r");
+ raf.readByte();
+ raf.close();
+ } catch (Exception f)
+ {
+ log.info("Couldn't random access file archive "+av, f);
+ }
+ try {
+ JarFile jf = new JarFile(av, true, JarFile.OPEN_READ);
+ if (jf.getEntry("vamsasDocument.xml")!=null)
+ {
+ log.info("Valid archive "+av);
+ }
+ jf.close();
+ } catch (Exception f)
+ {
+ log.info("Couldn't access jar archive "+av, f);
+ }
log.info("Opening archive "+av);
uk.ac.vamsas.client.simpleclient.VamsasArchive varchive = new uk.ac.vamsas.client.simpleclient.VamsasArchive(av, true);