public class UDUpdater
extends java.lang.Object
IUpdaterClient
is in charge of rebooting ISY. If
an IUpdaterClient
is not provided, the methods will
automatically reboot the ISY.Constructor and Description |
---|
UDUpdater() |
Modifier and Type | Method and Description |
---|---|
static boolean |
doUpdate(java.net.Socket s,
java.io.InputStream is,
java.io.OutputStream os,
byte[] image,
IUpdaterClient view)
This method is in charge of actually writing the file content to ISY.
|
static java.util.zip.ZipFile |
getUpdateImage(java.lang.Object p,
java.lang.String uid,
java.lang.String pwd)
Returns the update image in
ZipFile format for the given platform (param 1) |
static boolean |
update(IUpdateHandler dev,
java.util.zip.ZipFile zip,
boolean is_sysload,
IUpdaterClient view)
Updates ISY's files/directories based on the given ZIP file
|
static boolean |
updateProgram(java.io.InputStream is,
int size,
java.lang.String name,
IUpdateHandler dev,
IUpdaterClient view)
This method prepares the ISY to receive a file and write it to the given path
|
public static java.util.zip.ZipFile getUpdateImage(java.lang.Object p, java.lang.String uid, java.lang.String pwd) throws java.lang.Exception
ZipFile
format for the given platform (param 1)p
- - an object of type UDAutoUpdate.UDPlatform
uid
- - the AutoUpdate userid to access the update codepwd
- - the AutoUpdate password to access the update codeZipFile
; null otherwisejava.lang.Exception
public static boolean update(IUpdateHandler dev, java.util.zip.ZipFile zip, boolean is_sysload, IUpdaterClient view)
dev
- - the IUpdateHandler
is any object which has the capability
of impacting ISY's files and directories.
Note: UDProxyDevice
implements
IUpdateHandler
and, as such, it should be used as the
parameter to this methodzip
- - the zip file which is going to be updating ISYis_sysload
- - whether or not this is a system restoreview
- - the optional IUpdaterClient
which is notified of the progress
and errorspublic static boolean updateProgram(java.io.InputStream is, int size, java.lang.String name, IUpdateHandler dev, IUpdaterClient view)
is
- - the input stream connected to ISYsize
- - the size of the file being updatedname
- - the path (ISY path) which the file should be written todev
- - the IUpdateHandler
is any object which has the capability
of impacting ISY's files and directories.
Note: UDProxyDevice
implements
IUpdateHandler
and, as such, it should be used as the
parameter to this methodview
- - the optional IUpdaterClient
which is notified of the progress
and errorspublic static boolean doUpdate(java.net.Socket s, java.io.InputStream is, java.io.OutputStream os, byte[] image, IUpdaterClient view)
updateProgram(java.io.InputStream, int, java.lang.String, com.universaldevices.autoupdate.IUpdateHandler, com.universaldevices.autoupdate.IUpdaterClient)
methods
- - the socket which is already connected to ISYis
- - the input streamos
- - the output stream which writes the contents of the @param image
to ISYimage
- - the actual file contentview
- - the optional IUpdaterClient
which is notified of the progress
and errors