public class JarContentFileInfo extends ContentFileInfo
| Constructor and Description |
|---|
JarContentFileInfo(File file) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttributeValue(Attributes.Name attributeName,
String defaultValue)
Returns an attribute value as found in the manifest.
|
String |
getAttributeValue(String attributeName,
String defaultValue)
Returns an attribute value as found in the manifest.
|
String |
getDescription(String defaultValue)
Return a description of the Jar file (or archive satisfying Jar file structure) by inspecting the Manifest.
|
String |
getVersion(String defaultValue)
Returns the version of the Jar file (or archive satisfying Jar file structure) by inspecting the Manifest.
|
boolean |
isValid()
Determines if the content file is a valid jar file (i.e.
|
getContentFilepublic JarContentFileInfo(File file)
public boolean isValid()
true, you still are not guaranteed the jar
file has a non-null version because there may not
be a version attribute in the manifest.isValid in class ContentFileInfotrue if the file is a valid jar file with a manifestpublic String getVersion(String defaultValue)
getVersion in class ContentFileInfodefaultValue - the default valuepublic String getDescription(String defaultValue)
getDescription in class ContentFileInfodefaultValue - the default valuenull if it cannot be determinedpublic String getAttributeValue(Attributes.Name attributeName, String defaultValue)
attributeName - the attribute namedefaultValue - the default if the attribute does not exist in the manifestpublic String getAttributeValue(String attributeName, String defaultValue)
attributeName - the attribute namedefaultValue - the default if the attribute does not exist in the manifestCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.