NetDragons ALTR Stock Chart | Football Posters
Games | Free Web Hosting | DVD | Books | Shop | Posters
Google
Name
Password
Save Password?



[-]NetDragons.com
[-]Games
 | [-]24 Hour Games
 |  | [-]Nelzan
 |  |  | [+]Capital Ships
 |  |  | [+]Light Fighters
 |  |  | [+]Medium Fighters
 |  |  | [+]Play It Now!
 |  |  | [+]Player
 |  |  | [+]Forum
 |  |  | [-]Source Code
 |  | [+]Space Frag I
 |  | [+]GNet Server
 |  | [+]About
 |  | [+]Forum
 |  | [+]License
 | [+]Cards of Tridala
 | [+]Flash Games
 | [+]Vagabond's Quest+
 | [+]Vagabond's Quest v.2
 | [+]Projects
[+]NetDragons.com Live!
[+]Reward Center
[+]Software Center
[+]Company Information
[+]Personal Services
[+]Member Directory
[+]Free E-mail
[+]Buy Cool Stuff
[+]Posters
[+]Your Privacy

Class ZipImageLoader


[ Source | Index | Back to Nelzan ]

public class ZipImageLoader
extends Object
ZipImageLoader - Downloads a compressed Zip file and extracts the information into an Image Array.

This class is designed to cut dynamic load time by allowing the code developer to zip a large number of images and laod them as arrays in their program. Not only does this save download time by only requesting one file, the contents can be compressed.


Variable Index

 o comp
 o myImages
 o PATH
 o tracker
 o url

Constructor Index

 o ZipImageLoader(String, Applet)
Creates a new Instance of the class, so it can be used later.

Method Index

 o addImage(Image[], Image)
Used to Add an Image to the end of an Array.
 o getImages(String)
Downloads a zip file and extracts the contents into an images array.

Variables

 o PATH
 private static final String PATH
 o myImages
 Image myImages[]
 o tracker
 MediaTracker tracker
 o url
 String url
 o comp
 Applet comp

Constructors

 o ZipImageLoader
 public ZipImageLoader(String url,
                       Applet c)
Creates a new Instance of the class, so it can be used later.

Parameters:
url - Base URL, where all the Zip files are kept.
c - Instance of an Applet, for call backs.

Methods

 o getImages
 public Image[] getImages(String file)
Downloads a zip file and extracts the contents into an images array. This function also makes use a MediaTracker to make sure the images download and uses CRC32 to make sure the file integrity is good.

Parameters:
file - The file to download and extract
Returns:
and Image Array with the contents of the Zip File.
 o addImage
 private Image[] addImage(Image ary[],
                          Image im)
Used to Add an Image to the end of an Array.

Parameters:
ary - The old array.
im - New Image to add.
Returns:
The new array.
ND: VQ+, Mail, Shop, Free Web Hosting CTXS Stock Chart

SIRI Stock Chart
Copyrighted �, 2000, 2001 by NetDragons.com
Last Updated Saturday, December 5, 1998 - 21:40 EST