de.vxart.zipupdate
Class Indexer

java.lang.Object
  extended by de.vxart.zipupdate.Indexer

public class Indexer
extends java.lang.Object

Creates an index file from ZIP/JAR archives used by the client-side update mechanism to download individual ZIP entries from a web server.

Author:
Philipp Reichart, philipp.reichart@vxart.de

Method Summary
static void index(java.io.File archive)
          Creates an index file for the specified archive in the same directory.
static void main(java.lang.String[] args)
          Provides a basic stand-alone way to index archives.
static java.util.Map<Resource,java.lang.Long> parseZipFile(java.io.File archive)
          Manually parses a ZIP file without using any classes from java.util.zip.* to create a list of minimal Resources in the ZIP file including the end offsets of those entries.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Provides a basic stand-alone way to index archives.

Parameters:
args -
Throws:
java.lang.Exception

index

public static void index(java.io.File archive)
                  throws java.io.IOException
Creates an index file for the specified archive in the same directory. The index file will be named after the original file plus and ".idx" ending.

Parameters:
archive - the archive to generate an index for
Throws:
java.io.IOException

parseZipFile

public static java.util.Map<Resource,java.lang.Long> parseZipFile(java.io.File archive)
                                                           throws java.io.IOException
Manually parses a ZIP file without using any classes from java.util.zip.* to create a list of minimal Resources in the ZIP file including the end offsets of those entries.

Parameters:
archive - the ZIP file to parse
Returns:
a map of Resources and their end offsets in the ZIP file
Throws:
java.io.IOException