| java.lang.Object com.sun.midp.installer.Installer com.sun.midp.installer.FileInstaller
FileInstaller | public class FileInstaller extends Installer (Code) | | An Installer allowing to install a midlet suite from a file.
If the midlet suite is given by a descriptor file, the jar
URL specified in the descriptor must have a "file" scheme.
|
Constructor Summary | |
public | FileInstaller() Constructor of the FileInstaller. |
Method Summary | |
protected byte[] | downloadJAD() Downloads an application descriptor file from the given URL. | protected int | downloadJAR(String filename) Downloads an application archive file from the given URL into the
given file. | protected boolean | isSameUrl(String url1, String url2) Compares two URLs for equality in sense that they have the same
scheme, host and path. | public boolean | stopInstalling() Stops the installation. |
FileInstaller | public FileInstaller()(Code) | | Constructor of the FileInstaller.
|
downloadJAD | protected byte[] downloadJAD() throws IOException(Code) | | Downloads an application descriptor file from the given URL.
a byte array representation of the file or null if not found exception: IOException - is thrown if any error prevents the downloadof the JAD |
downloadJAR | protected int downloadJAR(String filename) throws IOException(Code) | | Downloads an application archive file from the given URL into the
given file. Automatically handle re-tries.
Parameters: filename - name of the file to write. This file residesin the storage area of the given application size of the JAR exception: IOException - is thrown if any error prevents the downloadof the JAR |
isSameUrl | protected boolean isSameUrl(String url1, String url2)(Code) | | Compares two URLs for equality in sense that they have the same
scheme, host and path.
Parameters: url1 - the first URL for comparision Parameters: url2 - the second URL for comparision true if the scheme, host and path of the first given urlis identical to the scheme, host and path of the secondgiven url; false otherwise |
stopInstalling | public boolean stopInstalling()(Code) | | Stops the installation. If installer is not installing then this
method has no effect. This will cause the install method to
throw an IOException if the install is not writing the suite
to storage which is the point of no return.
true if the install will stop, false if it is too late |
Methods inherited from com.sun.midp.installer.Installer | protected void checkForDifferentDomains(String url)(Code)(Java Doc) protected void checkForJadManifestMismatches() throws InvalidJadException(Code)(Java Doc) protected void checkPreviousVersion() throws InvalidJadException, MIDletSuiteLockedException(Code)(Java Doc) abstract protected byte[] downloadJAD() throws IOException(Code)(Java Doc) abstract protected int downloadJAR(String filename) throws IOException(Code)(Java Doc) protected byte[] getInitialPermissions(String domain) throws InvalidJadException(Code)(Java Doc) protected InstallStateImpl getInstallState()(Code)(Java Doc) public static String getUrlPath(String url)(Code)(Java Doc) public static String getUrlScheme(String url, String defaultScheme)(Code)(Java Doc) public int installJad(String location, int storageId, boolean force, boolean removeRMS, InstallListener installListener) throws IOException, InvalidJadException, MIDletSuiteLockedException, SecurityException(Code)(Java Doc) public int installJar(String location, String name, int storageId, boolean force, boolean removeRMS, InstallListener installListener) throws IOException, InvalidJadException, MIDletSuiteLockedException(Code)(Java Doc) public boolean isJadSigned()(Code)(Java Doc) abstract protected boolean isSameUrl(String url1, String url2)(Code)(Java Doc) protected int performInstall() throws IOException, InvalidJadException, MIDletSuiteLockedException(Code)(Java Doc) protected void postInstallMsgBackToProvider(String message)(Code)(Java Doc) protected void processPreviousRMS() throws IOException(Code)(Java Doc) public void setExtraPermissions(String extraPermissions)(Code)(Java Doc) public void setUnsignedSecurityDomain(String domain)(Code)(Java Doc) public boolean stopInstalling()(Code)(Java Doc) protected int transferData(InputStream in, OutputStream out, int chunkSize) throws IOException(Code)(Java Doc) public void verifyMIDlet(String classname) throws InvalidJadException(Code)(Java Doc) public boolean wasStopped()(Code)(Java Doc)
|
|
|