install
Class Util

java.lang.Object
  extended by install.Util

public class Util
extends Object

Supported API: true
Extendable: false


Constructor Summary
Util(String target)
          Supported API: true
 
Method Summary
static void CopyFile(InputStream in, OutputStream out)
          Copy the file from in file to the out file.
 void copyJar(String name)
          Restores a jar file from chunks named name#_jar.
static String getBootJarLocation()
          Returns boot.jar location.
static String getCacheDirectory(String codebase, String cacheLocation)
          Returns cache directory.
static Locale getLocale(Applet applet)
           
static String getLocalizedMessage(ResourceBundle resourceBundle, String messageKey, Object[] textInserts)
          Gets the localized message, for passed arguments.
static String getLocalizedMessage(ResourceBundle resourceBundle, String messageKey, Object[] textInserts, Applet applet)
          Gets the localized message, for passed arguments.
static void main(String[] args)
          Supported API: false
protected static void preProcessArgs(Object[] textInserts, Locale locale)
           
 void restoreJar(String name)
          Restores a jar file from chunks named name#.jar.
static void splitJar(String name, int maxsize)
          Splits a jar file into chunks named name#.jar.
 void unJarCopiedFiles(InputStream in)
          Unjars the files from the given inputStream.
 void unJarFiles(InputStream in)
          Unjars the files from the given inputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Util

public Util(String target)
Supported API: true

Method Detail

getLocale

public static Locale getLocale(Applet applet)

CopyFile

public static void CopyFile(InputStream in,
                            OutputStream out)
                     throws IOException
Copy the file from in file to the out file. Supported API: true

Parameters:
in - InputStream of the file to copy from.
out - OutputStream of the file to copy to.
Throws:
IOException - Thrown if an error occurs during the reading or writing of the files.

unJarFiles

public void unJarFiles(InputStream in)
                throws ZipException,
                       IOException
Unjars the files from the given inputStream. Supported API: true

Parameters:
in - InputStream of the jar file to unjar.
Throws:
ZipException
IOException

unJarCopiedFiles

public void unJarCopiedFiles(InputStream in)
                      throws ZipException,
                             IOException
Unjars the files from the given inputStream. Supported API: true

Parameters:
in - InputStream of the jar file to unjar.
Throws:
ZipException
IOException

getLocalizedMessage

public static String getLocalizedMessage(ResourceBundle resourceBundle,
                                         String messageKey,
                                         Object[] textInserts)
Gets the localized message, for passed arguments.



Supported API: true

Parameters:
rb - the resource bundle subclass containing the localizable message.
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text.
See Also:
ResourceBundle, MessageFormat

getLocalizedMessage

public static String getLocalizedMessage(ResourceBundle resourceBundle,
                                         String messageKey,
                                         Object[] textInserts,
                                         Applet applet)
Gets the localized message, for passed arguments.



Supported API: true

Parameters:
rb - the resource bundle subclass containing the localizable message.
key - the key associated with the localizable message
params - an optional set of objects to be formatted into the localizable message text.
See Also:
ResourceBundle, MessageFormat

splitJar

public static void splitJar(String name,
                            int maxsize)
Splits a jar file into chunks named name#.jar. Where '#' is a number which is incremented for each chunk.



Supported API: true

Parameters:
name - the name of the jar file (with no extension).
maxsize - the maximum size of a 'chunk'

restoreJar

public void restoreJar(String name)
                throws ZipException,
                       IOException
Restores a jar file from chunks named name#.jar. Where '#' is a number which is incremented for each chunk. Once restoration is complete, UnJarFiles is called.



Supported API: true

Parameters:
name - the name of the jar file (with no extension).
Throws:
ZipException
IOException

copyJar

public void copyJar(String name)
             throws ZipException,
                    IOException
Restores a jar file from chunks named name#_jar. Where '#' is a number which is incremented for each chunk. Once restoration is complete, UnJarFiles is called.



Supported API: true

Parameters:
name - the name of the jar file (with no extension).
Throws:
ZipException
IOException

preProcessArgs

protected static void preProcessArgs(Object[] textInserts,
                                     Locale locale)

main

public static void main(String[] args)
Supported API: false


getBootJarLocation

public static String getBootJarLocation()
                                 throws IOException
Returns boot.jar location.

Returns:
boot.jar location
Throws:
IOException

getCacheDirectory

public static String getCacheDirectory(String codebase,
                                       String cacheLocation)
Returns cache directory.

Parameters:
codebase - codebase URL
cacheLocation - cache directory specified for bootstrap loader