jfig.utils
Class MakeZipFile

java.lang.Object
  extended byjfig.utils.MakeZipFile

public class MakeZipFile
extends java.lang.Object


Field Summary
(package private)  java.util.Vector allFiles
           
(package private)  java.io.File baseDir
           
(package private)  java.util.Vector figFiles
           
(package private) static java.lang.String[] filenames
           
(package private)  java.lang.String[] fullfilenames
           
(package private)  java.util.zip.ZipOutputStream ZOS
           
 
Constructor Summary
MakeZipFile()
           
 
Method Summary
 void copyAllFilesFromZipArchive(java.lang.String filename)
          copy all files from the JAR/ZIP archive "filename" to our ZipOutputStream.
 void createDefaultManifestEntry()
          add a default META-INF/MANIFEST.MF manifest file with a Main-Class: jfig.gui.PresentationViewer attribute to our ZipOutputStream.
 void createJptEntry()
          this method writes the list of all slides in this presentation into the file "00presentation.jpt", then adds this file to the ZipOutputStream.
 void findAndAddFiles_OLD(java.lang.String dirname)
           
 void findAndAddFiles(java.lang.String dirname)
           
 void findFigFiles()
           
 void findFigFiles(java.io.File directory)
           
 java.lang.String getRelativeFilename(java.io.File file)
           
static void main(java.lang.String[] args)
          main: parse the command line arguments for output filename, slide directory, and pathname for the jfig presentation viewer class archive.
 void setBaseDir(java.io.File _dir)
           
static void usage()
          print a usage message, then exit
 void writeFigFiles()
           
 void writeZipEntry_OLD(java.lang.String filename)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZOS

java.util.zip.ZipOutputStream ZOS

baseDir

java.io.File baseDir

figFiles

java.util.Vector figFiles

allFiles

java.util.Vector allFiles

filenames

static java.lang.String[] filenames

fullfilenames

java.lang.String[] fullfilenames
Constructor Detail

MakeZipFile

public MakeZipFile()
Method Detail

setBaseDir

public void setBaseDir(java.io.File _dir)

findFigFiles

public void findFigFiles()
                  throws java.lang.Exception
Throws:
java.lang.Exception

findFigFiles

public void findFigFiles(java.io.File directory)
                  throws java.lang.Exception
Throws:
java.lang.Exception

findAndAddFiles

public void findAndAddFiles(java.lang.String dirname)
                     throws java.lang.Exception
Throws:
java.lang.Exception

findAndAddFiles_OLD

public void findAndAddFiles_OLD(java.lang.String dirname)
                         throws java.lang.Exception
Throws:
java.lang.Exception

writeZipEntry_OLD

public void writeZipEntry_OLD(java.lang.String filename)
                       throws java.io.IOException
Throws:
java.io.IOException

writeFigFiles

public void writeFigFiles()
                   throws java.lang.Exception
Throws:
java.lang.Exception

getRelativeFilename

public java.lang.String getRelativeFilename(java.io.File file)

createJptEntry

public void createJptEntry()
                    throws java.lang.Exception
this method writes the list of all slides in this presentation into the file "00presentation.jpt", then adds this file to the ZipOutputStream.

Throws:
java.lang.Exception

copyAllFilesFromZipArchive

public void copyAllFilesFromZipArchive(java.lang.String filename)
                                throws java.io.IOException
copy all files from the JAR/ZIP archive "filename" to our ZipOutputStream. This method prefers simplicity over performance, so we just decompress all entries of the source archive, then compress them back...

Throws:
java.io.IOException

createDefaultManifestEntry

public void createDefaultManifestEntry()
                                throws java.io.IOException
add a default META-INF/MANIFEST.MF manifest file with a Main-Class: jfig.gui.PresentationViewer attribute to our ZipOutputStream.

Throws:
java.io.IOException

usage

public static void usage()
print a usage message, then exit


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
main: parse the command line arguments for output filename, slide directory, and pathname for the jfig presentation viewer class archive. Then build a JAR archive with all the slides, the jfig presentation viewer classes, and the .jpt file with the slide names and URLs.

Throws:
java.lang.Exception