public class DefaultPackageManager extends java.lang.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(java.io.File packegeinfo) |
PackageInfo |
createPackageInfo(java.io.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(java.lang.String version) |
java.lang.String |
getArchitecture()
Returns the Architecture code of the system
|
java.lang.String |
getOperatingSystem()
Return the OS code of the system
|
java.lang.String |
getOperatingSystemFamily() |
java.lang.String |
getOperatingSystemName() |
java.lang.String |
getOperatingSystemVersion() |
void |
readPacakgeInfo(PackageInfo packageInfo,
java.io.File file) |
void |
readPacakgeInfo(PackageInfo pkg,
java.io.InputStream is) |
void |
writePacakgeInfo(PackageInfo packageInfo,
java.io.File file) |
void |
writePacakgeInfo(PackageInfo pkg,
java.io.OutputStream os) |
public Version createVersion()
PackageManager
createVersion
in interface PackageManager
public Version createVersion(java.lang.String version)
createVersion
in interface PackageManager
public PackageInfo createPackageInfo()
PackageManager
createPackageInfo
in interface PackageManager
public PackageInfo createPackageInfo(java.io.InputStream packegeinfo) throws BaseException
PackageManager
createPackageInfo
in interface PackageManager
packegeinfo
- as URLBaseException
public PackageInfo createPackageInfo(java.io.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 java.lang.String getOperatingSystem()
PackageManager
getOperatingSystem
in interface PackageManager
public java.lang.String getOperatingSystemFamily()
getOperatingSystemFamily
in interface PackageManager
public java.lang.String getOperatingSystemName()
getOperatingSystemName
in interface PackageManager
public java.lang.String getOperatingSystemVersion()
getOperatingSystemVersion
in interface PackageManager
public java.lang.String getArchitecture()
PackageManager
getArchitecture
in interface PackageManager
public void writePacakgeInfo(PackageInfo packageInfo, java.io.File file) throws java.io.IOException
writePacakgeInfo
in interface PackageManager
java.io.IOException
public void writePacakgeInfo(PackageInfo pkg, java.io.OutputStream os) throws java.io.IOException
writePacakgeInfo
in interface PackageManager
java.io.IOException
public void readPacakgeInfo(PackageInfo packageInfo, java.io.File file) throws java.io.IOException
readPacakgeInfo
in interface PackageManager
java.io.IOException
public void readPacakgeInfo(PackageInfo pkg, java.io.InputStream is) throws java.io.IOException
readPacakgeInfo
in interface PackageManager
java.io.IOException