|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.universaldevices.autoupdate.UDUpdater
public class UDUpdater
This class provides utilities to update files and programs
in ISY. In case a firmware update is issued (based on a zip file)
the IUpdaterClient
is in charge of rebooting ISY. If
an IUpdaterClient
is not provided, the methods will
automatically reboot the ISY.
Constructor Summary | |
---|---|
UDUpdater()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UDUpdater()
Method Detail |
---|
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 code
ZipFile
; null otherwise
java.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 errors
public 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 errors
public 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)
method
s
- - 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |