import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.io.RandomAccessFile;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Vector;
public class VamsasArchiveReader {
private static Log log = LogFactory.getLog(VamsasArchiveReader.class);
JarFile jfile;
+ boolean stream=false; // true if we are seeking on the stream.
+ RandomAccessFile rfile;
+ JarInputStream jstream;
public VamsasArchiveReader(File vamsasfile) {
jfile=null;
if (vamsasfile.exists()) {
}
/**
+ * in an ideal world - this constructor will create a reader object
+ * for the locked file's random access stream.
+ *
+ * @param vamsaslock
+ */
+ public VamsasArchiveReader(Lock vamsaslock) {
+ rfile = vamsaslock.rafile;
+ stream = true;
+ // TODO: Implement stream based JarFile access
+ log.error("NOT IMPLEMENTED STREAM-BASED JAR ACCESS");
+ throw new Error("Can't access a locked VamsasArchive file as a random access stream yet.");
+ // rfile.seek(0);
+
+ }
+ /**
* the vamsas document version(s) handled by this Reader
*/
final public static String DOCUMENT_VERSION="0.1";