public class DefaultPackageManager extends Object implements PackageManager
Modifier and Type | Class and Description |
---|---|
class |
DefaultPackageManager.BaseIOException |
PackageManager.ARCH, PackageManager.JVM, PackageManager.OS, PackageManager.STATE
PACKAGE_EXTENSION
Constructor and Description |
---|
DefaultPackageManager() |
Modifier and Type | Method and Description |
---|---|
Dependencies |
createDependencies() |
Dependency |
createDependency()
Create a empty dependency object.
|
Dependency |
createDependency(PackageInfo packageInfo)
Create a dependency instance with the data of the package.
|
PackageInfo |
createPackageInfo()
Create a empty PackageInfo instance
|
PackageInfo |
createPackageInfo(File packegeinfo) |
PackageInfo |
createPackageInfo(InputStream packegeinfo)
Create a PackageInfo and load contents from the specified InputStream using the
default reader.
|
Version |
createVersion()
Create a empty Version instance
|
Version |
createVersion(String version) |
String |
getArchitecture()
Returns the Architecture code of the system
|
String |
getOperatingSystem()
Return the OS code of the system
|
String |
getOperatingSystemFamily() |
String |
getOperatingSystemName() |
String |
getOperatingSystemVersion() |
void |
readPacakgeInfo(PackageInfo packageInfo,
File file) |
void |
readPacakgeInfo(PackageInfo pkg,
InputStream is) |
void |
writePacakgeInfo(PackageInfo packageInfo,
File file) |
void |
writePacakgeInfo(PackageInfo pkg,
OutputStream os) |
public Version createVersion()
PackageManager
createVersion
in interface PackageManager
public Version createVersion(String version)
createVersion
in interface PackageManager
public PackageInfo createPackageInfo()
PackageManager
createPackageInfo
in interface PackageManager
public PackageInfo createPackageInfo(InputStream packegeinfo) throws BaseException
PackageManager
createPackageInfo
in interface PackageManager
packegeinfo
- as URLBaseException
public PackageInfo createPackageInfo(File packegeinfo) throws BaseException
createPackageInfo
in interface PackageManager
BaseException
public Dependency createDependency()
PackageManager
createDependency
in interface PackageManager
public Dependency createDependency(PackageInfo packageInfo)
PackageManager
createDependency
in interface PackageManager
public Dependencies createDependencies()
createDependencies
in interface PackageManager
public String getOperatingSystem()
PackageManager
getOperatingSystem
in interface PackageManager
public String getOperatingSystemFamily()
getOperatingSystemFamily
in interface PackageManager
public String getOperatingSystemName()
getOperatingSystemName
in interface PackageManager
public String getOperatingSystemVersion()
getOperatingSystemVersion
in interface PackageManager
public String getArchitecture()
PackageManager
getArchitecture
in interface PackageManager
public void writePacakgeInfo(PackageInfo packageInfo, File file) throws IOException
writePacakgeInfo
in interface PackageManager
IOException
public void writePacakgeInfo(PackageInfo pkg, OutputStream os) throws IOException
writePacakgeInfo
in interface PackageManager
IOException
public void readPacakgeInfo(PackageInfo packageInfo, File file) throws IOException
readPacakgeInfo
in interface PackageManager
IOException
public void readPacakgeInfo(PackageInfo pkg, InputStream is) throws IOException
readPacakgeInfo
in interface PackageManager
IOException