update
Class JAPUpdateWizard.JapDownloadManager

java.lang.Object
  extended by update.JAPUpdateWizard.JapDownloadManager
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
JAPUpdateWizard

final class JAPUpdateWizard.JapDownloadManager
extends java.lang.Object
implements java.lang.Runnable

This class manages the download process of a new Jap version jar file.


Field Summary
private  int downloadResult
          Stores the download result (0 if it was successful, -1 if there was an error).
private  java.lang.String fileName
          Stores the path, filename and the query String of the new jar file at the remote system.
private  byte[] newJarBuff
          Stores the new jar file.
private  ListenerInterface targetInterface
          Stores the ListenerInterface of the system, where the new jar file is located.
 
Constructor Summary
JAPUpdateWizard.JapDownloadManager(java.net.URL jarUrl)
          Constructs a new JapDownloadManager.
 
Method Summary
 int getDownloadResult()
          Returns the error code of the download (0 - download successful, -1 - download aborted).
 byte[] getNewJar()
          Returns the new jar file as byte array.
 void run()
          This method is executed by the internal Thread.
 void startDownload()
          This method starts the download of the new jar file by creating the internal thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetInterface

private ListenerInterface targetInterface
Stores the ListenerInterface of the system, where the new jar file is located.


fileName

private java.lang.String fileName
Stores the path, filename and the query String of the new jar file at the remote system.


downloadResult

private int downloadResult
Stores the download result (0 if it was successful, -1 if there was an error).


newJarBuff

private byte[] newJarBuff
Stores the new jar file.

Constructor Detail

JAPUpdateWizard.JapDownloadManager

public JAPUpdateWizard.JapDownloadManager(java.net.URL jarUrl)
                                   throws java.lang.Exception
Constructs a new JapDownloadManager.

Parameters:
jarUrl - The URL of the wanted jar file.
Throws:
java.lang.Exception
Method Detail

run

public void run()
This method is executed by the internal Thread. The jar file download is done here. Don't call this method directly.

Specified by:
run in interface java.lang.Runnable

startDownload

public void startDownload()
This method starts the download of the new jar file by creating the internal thread.


getDownloadResult

public int getDownloadResult()
Returns the error code of the download (0 - download successful, -1 - download aborted).

Returns:
The result code of the download.

getNewJar

public byte[] getNewJar()
Returns the new jar file as byte array. Null is returned, if getDownloadResult() is not 0.

Returns:
The byte array of the new jar file.