|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.sdklib.internal.repository.archives.Archive
public class Archive
A Archive is the base class for "something" that can be downloaded from
the SDK repository.
SdkSource (a download site).
The ArchiveInstaller takes care of downloading, unpacking and installing an archive.
| Nested Class Summary | |
|---|---|
static class |
Archive.Arch
The Architecture that this archive can be downloaded on. |
static class |
Archive.ChecksumType
The checksum type. |
static class |
Archive.Os
The OS that this archive can be downloaded on. |
| Constructor Summary | |
|---|---|
Archive(Package pkg,
Archive.Os os,
Archive.Arch arch,
java.lang.String url,
long size,
java.lang.String checksum)
Creates a new remote archive. |
|
Archive(Package pkg,
java.util.Properties props,
Archive.Os os,
Archive.Arch arch,
java.lang.String localOsPath)
Creates a new local archive. |
|
| Method Summary | |
|---|---|
int |
compareTo(Archive rhs)
Archives are compared using their Package ordering. |
void |
deleteLocal()
Delete the archive folder if this is a local archive. |
boolean |
equals(java.lang.Object obj)
Note: An Archive's equality does NOT depend on the parent Package equality. |
Archive.Arch |
getArch()
Returns the archive Archive.Arch enum. |
java.lang.String |
getChecksum()
Returns the SHA1 archive checksum, as a 40-char hex. |
Archive.ChecksumType |
getChecksumType()
Returns the checksum type, always Archive.ChecksumType.SHA1 right now. |
java.lang.String |
getLocalOsPath()
Returns the local OS folder where a local archive is installed. |
java.lang.String |
getLongDescription()
Generates a longer description for this archive. |
Archive.Os |
getOs()
Returns the archive Archive.Os enum. |
java.lang.String |
getOsDescription()
Generates a description for this archive of the OS/Arch supported by this archive. |
Package |
getParentPackage()
Returns the package that created and owns this archive. |
java.lang.String |
getSha1Description()
|
java.lang.String |
getShortDescription()
Generates a short description for this archive. |
long |
getSize()
Returns the archive size, an int > 0. |
java.lang.String |
getSizeDescription()
|
java.lang.String |
getUrl()
Returns the download archive URL, either absolute or relative to the repository xml. |
int |
hashCode()
Note: An Archive's hash code does NOT depend on the parent Package hash code. |
boolean |
isCompatible()
Returns true if this archive can be installed on the current platform. |
boolean |
isLocal()
Returns true if this is a locally installed archive. |
java.lang.String |
toString()
Returns the short description of the source, if not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Archive(Package pkg,
Archive.Os os,
Archive.Arch arch,
java.lang.String url,
long size,
java.lang.String checksum)
public Archive(Package pkg,
java.util.Properties props,
Archive.Os os,
Archive.Arch arch,
java.lang.String localOsPath)
| Method Detail |
|---|
public boolean isLocal()
public Package getParentPackage()
public long getSize()
public java.lang.String getChecksum()
public Archive.ChecksumType getChecksumType()
Archive.ChecksumType.SHA1 right now.
public java.lang.String getUrl()
getLocalOsPath()public java.lang.String getLocalOsPath()
getUrl()public Archive.Os getOs()
Archive.Os enum.
Can be null for a local installed folder on an unknown OS.
public Archive.Arch getArch()
Archive.Arch enum.
Can be null for a local installed folder on an unknown architecture.
public java.lang.String getOsDescription()
public java.lang.String toString()
IDescription interface.
toString in class java.lang.Objectpublic java.lang.String getShortDescription()
getShortDescription in interface IDescriptionpublic java.lang.String getLongDescription()
getLongDescription in interface IDescriptionpublic java.lang.String getSizeDescription()
public java.lang.String getSha1Description()
public boolean isCompatible()
public void deleteLocal()
public int compareTo(Archive rhs)
Package ordering.
compareTo in interface java.lang.Comparable<Archive>Package.compareTo(Package)public int hashCode()
Archive's hash code does NOT depend on the parent Package hash code.
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
Archive's equality does NOT depend on the parent Package equality.
equals in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||