|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.update.web.WebUpdate
public class WebUpdate
A JavaWebStart-launched installation/update facility.
This is designed to be standalone; it does not depend on any other Partner packages and a minimal set of third-party libraries. Therefore, it has many redundancies with com.partnersoft.io and com.partnersoft.update classes.
NOTE: this class must compile under Java 1.4 to ensure broad compatibility across computers, since it will be launched using JavaWebStart and not our own Java. This means you can't use generics or for-each loops or other 1.5+ features.
Copyright 2005-2009 Partner Software, Inc.
| Field Summary | |
|---|---|
int |
BUFFER_SIZE
|
| Fields inherited from interface com.partnersoft.update.web.WebUpdateConstants |
|---|
CENTRAL_HUB, CONFIG_LEVELS, DISTRIBUTION, INSTALL_TYPES, MAP_TRANSLATOR, MASTER_INSTALL, OS, OS_DIRS, PALM_USER, PROVIDER, SHORT_INSTALL_TYPES, SITE_HUB, USER, WEB_USER |
| Constructor Summary | |
|---|---|
WebUpdate(java.lang.String action,
java.lang.String source,
java.lang.String installType,
java.lang.String destination)
|
|
| Method Summary | |
|---|---|
java.util.ArrayList |
contentsForPackage(java.lang.String packageName)
|
java.io.File |
createFile(java.io.File base,
java.lang.String path)
|
java.io.File |
createFile(java.lang.String path)
|
java.io.File |
createFileMakeDir(java.lang.String path)
|
java.net.URL |
createURL(java.lang.String path)
|
java.net.URL |
createURL(java.net.URL base,
java.lang.String path)
|
void |
die(java.lang.String message,
java.lang.Throwable oopsie)
|
long |
downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink)
Copies (or downloads) from the source to the sink, using a large buffer, while simultaneously generating a checksum that can be used to verify that the copied data matches what was expected. |
long |
downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink,
long howMany,
boolean showProgress)
Copies (or downloads) from the source to the sink, using a large buffer, while simultaneously generating a checksum that can be used to verify that the copied data matches what was expected. |
void |
execAndHalt(java.lang.String command)
Executes the given OS-specific command; then halts the current Java session. |
void |
execAndHalt(java.lang.String command,
java.io.File currentDir)
Executes the given OS-specific command; then halts the current Java session. |
void |
execAndWait(java.lang.String command,
java.io.File currentDir)
|
java.lang.Process |
execNoWait(java.lang.String command)
Same as execNoWait(command, currentDir) but defaulted to the install directory. |
java.lang.Process |
execNoWait(java.lang.String command,
java.io.File currentDir)
Same as execAndWait(command, currentDir) but does not wait - the process continues in a separate thread. |
boolean |
getExitWhenDone()
|
java.lang.String |
getOSType()
|
java.lang.String |
humaneTimestamp()
|
boolean |
isFailOnChecksumMismatch()
|
boolean |
isHeadless()
|
void |
logOutput(java.lang.Process proc)
|
static void |
main(java.lang.String[] argv)
|
static void |
makeAbsolutelySureItAintA3xInstall(java.io.File installDir)
|
void |
makeDirsFor(java.io.File file)
|
void |
move(java.lang.String fromPath,
java.lang.String toPath)
|
java.lang.String |
readLineFromDestination(java.lang.String path)
|
java.lang.String |
readLineFromSource(java.lang.String path)
|
java.util.List |
readListFromSource(java.lang.String path)
|
java.util.Set |
readSetFromSource(java.lang.String path)
|
void |
setExitWhenDone(boolean tizit)
|
void |
setFailOnChecksumMismatch(boolean failOnChecksumMismatch)
|
void |
setHeadless(boolean tizit)
|
java.lang.String |
slashToSeparator(java.lang.String filename)
Unscrubs a string, turning Unix-style slashes into native File.separator strings. |
long |
streamCopy(java.io.InputStream source,
java.io.OutputStream sink,
long howMany,
boolean showProgress)
|
long |
streamCopyLengthUnknown(java.io.InputStream source,
java.io.OutputStream sink)
|
long |
streamSkip(java.io.InputStream source,
long howMany,
boolean showProgress)
|
boolean |
testBoxcar(java.io.File boxcarFile)
|
void |
unpack(java.io.File boxcarFile,
java.io.File destinationDir)
|
void |
update()
The driver function; calls the full update sequence. |
java.util.TreeSet |
whichPackages(java.lang.String sourceType,
java.lang.String destinationType,
java.lang.String osType,
java.util.Collection mapPackages)
|
void |
writeLine(java.lang.String path,
java.lang.String line)
|
void |
writeList(java.lang.String path,
java.util.Collection list)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int BUFFER_SIZE
| Constructor Detail |
|---|
public WebUpdate(java.lang.String action,
java.lang.String source,
java.lang.String installType,
java.lang.String destination)
| Method Detail |
|---|
public static void main(java.lang.String[] argv)
public void update()
throws java.io.IOException
java.io.IOExceptionpublic java.util.ArrayList contentsForPackage(java.lang.String packageName)
public void unpack(java.io.File boxcarFile,
java.io.File destinationDir)
throws java.io.IOException
java.io.IOException
public boolean testBoxcar(java.io.File boxcarFile)
throws java.io.IOException
java.io.IOException
public static void makeAbsolutelySureItAintA3xInstall(java.io.File installDir)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String slashToSeparator(java.lang.String filename)
public java.net.URL createURL(java.net.URL base,
java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.net.URL createURL(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.io.File createFile(java.io.File base,
java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.io.File createFile(java.lang.String path)
throws java.io.IOException
java.io.IOException
public void makeDirsFor(java.io.File file)
throws java.io.IOException
java.io.IOException
public java.io.File createFileMakeDir(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.lang.String readLineFromSource(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.util.List readListFromSource(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.util.Set readSetFromSource(java.lang.String path)
throws java.io.IOException
java.io.IOException
public java.lang.String readLineFromDestination(java.lang.String path)
throws java.io.IOException
java.io.IOException
public void writeLine(java.lang.String path,
java.lang.String line)
throws java.io.IOException
java.io.IOException
public void writeList(java.lang.String path,
java.util.Collection list)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getOSType()
public java.lang.String humaneTimestamp()
public java.util.TreeSet whichPackages(java.lang.String sourceType,
java.lang.String destinationType,
java.lang.String osType,
java.util.Collection mapPackages)
public long downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink,
long howMany,
boolean showProgress)
throws java.io.IOException
java.io.IOException
public long downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink)
throws java.io.IOException
java.io.IOException
public long streamCopy(java.io.InputStream source,
java.io.OutputStream sink,
long howMany,
boolean showProgress)
throws java.io.IOException
java.io.IOException
public long streamSkip(java.io.InputStream source,
long howMany,
boolean showProgress)
throws java.io.IOException
java.io.IOException
public long streamCopyLengthUnknown(java.io.InputStream source,
java.io.OutputStream sink)
throws java.io.IOException
java.io.IOException
public void move(java.lang.String fromPath,
java.lang.String toPath)
throws java.io.IOException
java.io.IOException
public void execAndWait(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOException
public java.lang.Process execNoWait(java.lang.String command)
throws java.io.IOException
java.io.IOException
public java.lang.Process execNoWait(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOException
public void execAndHalt(java.lang.String command)
throws java.io.IOException
java.io.IOException
public void execAndHalt(java.lang.String command,
java.io.File currentDir)
throws java.io.IOException
java.io.IOExceptionpublic void logOutput(java.lang.Process proc)
public void die(java.lang.String message,
java.lang.Throwable oopsie)
public boolean isHeadless()
public void setHeadless(boolean tizit)
public boolean getExitWhenDone()
public void setExitWhenDone(boolean tizit)
public boolean isFailOnChecksumMismatch()
public void setFailOnChecksumMismatch(boolean failOnChecksumMismatch)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||