|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.update.app.UpdateFileLogic
public class UpdateFileLogic
Update logic pertaining to file management, downloading, and other I/O.
Much of these method are copied from various classes in com.partnersoft.io; they are duplicated here so that the Update subsystem doesn't depend on Java 1.6 or the rest of the Partner platform.
Copyright 2010 Partner Software, Inc.
| Field Summary | |
|---|---|
int |
BUFFER_SIZE
Buffer size used. |
| Constructor Summary | |
|---|---|
UpdateFileLogic(UpdateApp app)
|
|
| Method Summary | |
|---|---|
void |
copy(java.io.InputStream source,
java.io.OutputStream sink,
long howMany)
Copies (or downloads) from the source to the sink, using a large buffer. |
long |
downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink,
long howMany)
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 |
downloadPackageFile(UpdatePackageFile packageFile)
Copy the given package from the source to the sink, verifying both size and checksum. |
void |
downloadUpdatedPackages()
Download the updated packages from the source to the downloads directory of the destination. |
void |
installUpdatedPackages()
Install the updated packages, removing existing files first. |
void |
lock(java.lang.String explanation)
|
void |
moveDownloads()
Move the downloaded package files to the update/packages directory. |
void |
removeDownloads()
Remove the update/downloads directory in the destination and all contents. |
void |
unlock()
|
void |
unpack(UpdatePackageFile packageFile)
|
void |
updateInfoFiles()
Write the update chain and other text files associated with the install. |
| 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 UpdateFileLogic(UpdateApp app)
| Method Detail |
|---|
public void downloadPackageFile(UpdatePackageFile packageFile)
throws java.io.IOException
java.io.IOException
public long downloadAndChecksum(java.io.InputStream source,
java.io.OutputStream sink,
long howMany)
throws java.io.IOException
java.io.IOException
public void copy(java.io.InputStream source,
java.io.OutputStream sink,
long howMany)
throws java.io.IOException
java.io.IOException
public void lock(java.lang.String explanation)
throws java.io.IOException
java.io.IOException
public void unlock()
throws java.io.IOException
java.io.IOException
public void unpack(UpdatePackageFile packageFile)
throws java.io.IOException
java.io.IOException
public void downloadUpdatedPackages()
throws java.io.IOException
java.io.IOException
public void installUpdatedPackages()
throws java.io.IOException
java.io.IOException
public void removeDownloads()
throws java.io.IOException
java.io.IOException
public void moveDownloads()
throws java.io.IOException
java.io.IOException
public void updateInfoFiles()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||