public class GenericContentFileInfo extends ContentFileInfo
ContentFileInfo implementation exists to handle a specific file.| Constructor and Description |
|---|
GenericContentFileInfo(File file) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription(String defaultValue)
This method simply returns the default value.
|
String |
getVersion(String defaultValue)
If the caller provided a default value, it is used.
|
boolean |
isValid()
Any file is considered valid if it exists and is readable.
|
getContentFilepublic GenericContentFileInfo(File file)
public boolean isValid()
isValid in class ContentFileInfotrue iff the file exists and is readablepublic String getVersion(String defaultValue)
null, this will generate a version string
equal to the file's MD5 hashcode. If this fails to calculate the
MD5, a runtime exception is thrown.getVersion in class ContentFileInfodefaultValue - the string to return, unless this is nullnull, otherwise, the MD5 of the filepublic String getDescription(String defaultValue)
getDescription in class ContentFileInfodefaultValue - the value that will be returnedCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.