Project CASUAL
API for CASUAL
 All Classes Namespaces Functions Variables
Public Member Functions | Public Attributes | List of all members
CASUAL.network.CASUALUpdates Class Reference

Public Member Functions

 CASUALUpdates (CASUALSessionData sd)
 
boolean downloadFileFromInternet (String URL, String outputFile, String friendlyName)
 
boolean downloadFileFromInternet (URL url, String outputFile, String friendlyName)
 
void displayCASUALString (String[] CASUALString)
 
URL stringToFormattedURL (String stringURL) throws MalformedURLException, URISyntaxException
 
String getWebData (String script) throws MalformedURLException, IOException, URISyntaxException
 
InputStream downloadMetaFromRepoForScript (Script s) throws MalformedURLException, URISyntaxException, IOException
 
InputStream streamFileFromNet (String link) throws MalformedURLException, URISyntaxException, IOException
 
String CASUALRepoDownload (String propertiesFileInCASUALOnlineRepo) throws FileNotFoundException, IOException, InterruptedException
 
Script updateScript (Script script, String tempFolder) throws ZipException, IOException, MalformedURLException, URISyntaxException
 
int tryGetFileSize (URL url)
 
 CASUALUpdates (CASUALSessionData sd)
 
boolean downloadFileFromInternet (String URL, String outputFile, String friendlyName)
 
boolean downloadFileFromInternet (URL url, String outputFile, String friendlyName)
 
void displayCASUALString (String[] CASUALString)
 
URL stringToFormattedURL (String stringURL) throws MalformedURLException, URISyntaxException
 
String getWebData (String script) throws MalformedURLException, IOException, URISyntaxException
 
InputStream downloadMetaFromRepoForScript (Script s) throws MalformedURLException, URISyntaxException, IOException
 
InputStream streamFileFromNet (String link) throws MalformedURLException, URISyntaxException, IOException
 
String CASUALRepoDownload (String propertiesFileInCASUALOnlineRepo) throws FileNotFoundException, IOException, InterruptedException
 
Script updateScript (Script script, String tempFolder) throws ZipException, IOException, MalformedURLException, URISyntaxException
 
int tryGetFileSize (URL url)
 

Public Attributes

final String CASUALRepo = "http://android-casual.googlecode.com/svn/trunk/CASUALcore/src"
 

Detailed Description

provides a way to check and update CASUAL

Author
Adam Outler adamo.nosp@m.utle.nosp@m.r@gma.nosp@m.il.c.nosp@m.om

Member Function Documentation

String CASUAL.network.CASUALUpdates.CASUALRepoDownload ( String  propertiesFileInCASUALOnlineRepo) throws FileNotFoundException, IOException, InterruptedException

downloads proper file if available in repository

Parameters
propertiesFileInCASUALOnlineReporequested file to be downloaded ie -"heimdall" will be translated to web url:heimdallWin32.zip, downloaded and the path to the downloaded file is returned.
Returns
file downloaded for system/arch
Exceptions
FileNotFoundExceptionfile not found
IOExceptionpermission problem
InterruptedExceptionthread interrupted
String CASUAL.network.CASUALUpdates.CASUALRepoDownload ( String  propertiesFileInCASUALOnlineRepo) throws FileNotFoundException, IOException, InterruptedException

downloads proper file if available in repository

Parameters
propertiesFileInCASUALOnlineReporequested file to be downloaded ie -"heimdall" will be translated to web url:heimdallWin32.zip, downloaded and the path to the downloaded file is returned.
Returns
file downloaded for system/arch
Exceptions
FileNotFoundExceptionfile not found
IOExceptionpermission problem
InterruptedExceptionthread interrupted
void CASUAL.network.CASUALUpdates.displayCASUALString ( String[]  CASUALString)

displays data from a split meta file

Parameters
CASUALStringmeta information to be displayed 0-id 1-revsion 2-minimum svn 3-support URL 4-update message
void CASUAL.network.CASUALUpdates.displayCASUALString ( String[]  CASUALString)

displays data from a split meta file

Parameters
CASUALStringmeta information to be displayed 0-id 1-revsion 2-minimum svn 3-support URL 4-update message
boolean CASUAL.network.CASUALUpdates.downloadFileFromInternet ( String  URL,
String  outputFile,
String  friendlyName 
)

downloads a file

Parameters
URLweb location to download
outputFilethe local file to output
friendlyNamename displayed to user
Returns
true if downloaded
boolean CASUAL.network.CASUALUpdates.downloadFileFromInternet ( String  URL,
String  outputFile,
String  friendlyName 
)

downloads a file

Parameters
URLweb location to download
outputFilethe local file to output
friendlyNamename displayed to user
Returns
true if downloaded
boolean CASUAL.network.CASUALUpdates.downloadFileFromInternet ( URL  url,
String  outputFile,
String  friendlyName 
)

downloads a file

Parameters
urlweb location to download
outputFilethe local file to output
friendlyNamename displayed to user
Returns
true if downloaded
boolean CASUAL.network.CASUALUpdates.downloadFileFromInternet ( URL  url,
String  outputFile,
String  friendlyName 
)

downloads a file

Parameters
urlweb location to download
outputFilethe local file to output
friendlyNamename displayed to user
Returns
true if downloaded
InputStream CASUAL.network.CASUALUpdates.downloadMetaFromRepoForScript ( Script  s) throws MalformedURLException, URISyntaxException, IOException

downloads metadata for the current script from the repository.

Parameters
sScript for information to be pulled
Returns
InputStream representing a properties file with metadata about online version of the script.
Exceptions
MalformedURLExceptionURL/URI is corrupt
URISyntaxExceptionURL/URI is corrupt
IOExceptionpermission problem
InputStream CASUAL.network.CASUALUpdates.downloadMetaFromRepoForScript ( Script  s) throws MalformedURLException, URISyntaxException, IOException

downloads metadata for the current script from the repository.

Parameters
sScript for information to be pulled
Returns
InputStream representing a properties file with metadata about online version of the script.
Exceptions
MalformedURLExceptionURL/URI is corrupt
URISyntaxExceptionURL/URI is corrupt
IOExceptionpermission problem
String CASUAL.network.CASUALUpdates.getWebData ( String  script) throws MalformedURLException, IOException, URISyntaxException

gets the data from the online script

Parameters
scriptScript to pull online metadata for
Returns
String representation of the metadata for the script.
Exceptions
MalformedURLExceptionurl is corrupt
IOExceptionpermission problem
URISyntaxExceptionuri is corrupt
String CASUAL.network.CASUALUpdates.getWebData ( String  script) throws MalformedURLException, IOException, URISyntaxException

gets the data from the online script

Parameters
scriptScript to pull online metadata for
Returns
String representation of the metadata for the script.
Exceptions
MalformedURLExceptionurl is corrupt
IOExceptionpermission problem
URISyntaxExceptionuri is corrupt
InputStream CASUAL.network.CASUALUpdates.streamFileFromNet ( String  link) throws MalformedURLException, URISyntaxException, IOException

Opens a file from a URL as a stream

Parameters
linkString representation of URL
Returns
InputStream object to file.
Exceptions
MalformedURLExceptionURL/URI is corrupt
URISyntaxExceptionURL/URI is corrupt
IOExceptionpermission problem
InputStream CASUAL.network.CASUALUpdates.streamFileFromNet ( String  link) throws MalformedURLException, URISyntaxException, IOException

Opens a file from a URL as a stream

Parameters
linkString representation of URL
Returns
InputStream object to file.
Exceptions
MalformedURLExceptionURL/URI is corrupt
URISyntaxExceptionURL/URI is corrupt
IOExceptionpermission problem
URL CASUAL.network.CASUALUpdates.stringToFormattedURL ( String  stringURL) throws MalformedURLException, URISyntaxException

converts a string to a URL

Parameters
stringURLraw URL in string format
Returns
URL formatted properly
Exceptions
MalformedURLExceptionif URL is corrupt
URISyntaxExceptionif URI is corrupt
URL CASUAL.network.CASUALUpdates.stringToFormattedURL ( String  stringURL) throws MalformedURLException, URISyntaxException

converts a string to a URL

Parameters
stringURLraw URL in string format
Returns
URL formatted properly
Exceptions
MalformedURLExceptionif URL is corrupt
URISyntaxExceptionif URI is corrupt
Script CASUAL.network.CASUALUpdates.updateScript ( Script  script,
String  tempFolder 
) throws ZipException, IOException, MalformedURLException, URISyntaxException

Updates a script. Uses online repository specified in sd.

Parameters
scriptCASUAL.caspac.Script object to be updated
tempFolderTemp Folder to use for updating.
Returns
New, updated script.
Exceptions
ZipExceptionzip corrupted
IOExceptionpermission problem
MalformedURLExceptionurl/uri malformed
URISyntaxExceptionurl/uri malformed
Script CASUAL.network.CASUALUpdates.updateScript ( Script  script,
String  tempFolder 
) throws ZipException, IOException, MalformedURLException, URISyntaxException

Updates a script. Uses online repository specified in sd.

Parameters
scriptCASUAL.caspac.Script object to be updated
tempFolderTemp Folder to use for updating.
Returns
New, updated script.
Exceptions
ZipExceptionzip corrupted
IOExceptionpermission problem
MalformedURLExceptionurl/uri malformed
URISyntaxExceptionurl/uri malformed

Member Data Documentation

final String CASUAL.network.CASUALUpdates.CASUALRepo = "http://android-casual.googlecode.com/svn/trunk/CASUALcore/src"

location to CASUAL online repository


The documentation for this class was generated from the following file: