Zip2web
Principal Arriba Publications Zip2web Mobility Models

 

This tiny tool lets you use your favorite browser to read documentation released in ZIP format (as the one with JDK) without decompressing previously ZIP archive. It conserves disk space and reduces your total file count. It is a multithreaded application to maintain good performance.

It is only a one class program, and due to its simple approach,  you must previously know the initial "index.html" (or the like) location. (Or use the one the program tells you, which will be incorrect if it cannot find some file called index.htm inside ZIP file).

For example:

wpe1.jpg (11723 bytes)

In this ZIP file (from Mary Campione's Java Tutorial) the index.html (start document) is located on the root directory. To invoke the Zip2web tool you must write:

java Zip2web [path/]Jtutorial.zip 80

And then start your web browser and point to the URL:

http://localhost/index.html

You can now start your navigation inside this ZIP file. And all external links will also work as usual.

A computer running Zip2web can also be accesed from any other computer with a web browser.

Zip2web provides you a complete contents list if you specify the root file '/'. (e.g. http://localhost/).

Please note that the start URL will be suggested if you mistype one. Also, if you get a BindException (Address already in use) will be, probably, due to port 80 is already used (by your web server), simply select another free port (try:8080) and that's all. (In this case you must include the port number in the URL after a colon between the host name and the path. For example, if you use port 8080 the new url will be: http://localhost:8080/index.html).

If you think it can be useful, click here to download (2.4k only, including uncommented (oops) source code).

Or donwload JDK1.2 only new version (10k).AG00010_.gif (6417 bytes)

Below you'll find my email, please feel free to send me any comment about Zip2web.

Bugs Fixed and tricks

May be you think the program will exhibit better performace if you use a buffer to transfer data between zip file and socket stream (I'm actually doing it on a byte-per-byte basis). However, due to a bug on the zip support, you can miss some data reading from zip file in large chunks (that's why I'm doing the other way).
New version correclty loads applets on JDK appletviewer. Due to an extra 0x0a char added incorrectly in previous versions, some Java applets did not load. Just fixed (7/17/98).
Zip2web now starts your browser on the start page (if found). You need a shell script named "explorer" calling your browser and passing it the URL parameter received. If you have Windows with MS explorer you do not need this script (7/24/98).
Another improvement I've done in my desktop is a shortcut icon that calls the 'java Zip2web ...'. If you drag any ZIP file and drop it over this shortcut (and you have arranged it properly) you can start Zip2web using this ZIP file (and since last modification also starting your browser). All with only a drag and drop operation (9/2/98).
JDK 1.2 Problems? Yes (it was my fault). In a few days I'll put a fixed version (11/15/98).
Current donwloadable version works Ok with JDK 1.2 (and also with JDK 1.1). (11/17/98).
Oops! Current version includes correct ".java" files viewing and works either 1.1 or 1.2 JDK versions Ok. (11/24/98).
Last time changes from JDK1.2RC0 to JDK1.2. (However current version maintains compatibility with 1.1, therefore it is slower than it could be due to the zip bug) (12/16/98).

 

  Hit Counter

Universidad Politécnica de Valencia (SPAIN)

E-mail: misan@ieee.org
or ...      misan@acm.org

Last modified 13-jun-2001