com.jguild.jrpm.io
public class RPMFile extends Object
UNKNOWN: Implement equals()
Field Summary | |
---|---|
static Logger | logger |
Constructor Summary | |
---|---|
RPMFile()
Creates a new empty RPMFile object. | |
RPMFile(File fh)
Creates a new RPMFile object out of a file.
|
Method Summary | |
---|---|
void | close()
Release locked resources. |
RPMHeader | getHeader()
Get the header section of this rpm file.
|
static String[] | getKnownTagNames()
Get all known tags of this rpm file. |
RPMLead | getLead()
Get the lead section of this rpm file
|
String[] | getLocales()
Return all known locales that are supported by this RPM file. |
RPMSignature | getSignature()
Get the signature section of this rpm file
|
DataTypeIf | getTag(Long tag)
Get a tag by id as a Long
|
DataTypeIf | getTag(long tag)
Get a tag by id as a long
|
DataTypeIf | getTag(String tagname)
Get a tag by name
|
long | getTagIdForName(String tagname)
Read a tag with a given tag name.
|
long[] | getTagIds()
Get all tag ids contained in this rpm file.
|
String | getTagNameForId(long tagid)
Read a tag with a given tag id.
|
String[] | getTagNames()
Get all tag names contained in this rpm file.
|
static RPMFile | loadUsingNative(File file)
Load an RPM file using the native rpm executables.
|
void | parse()
Parse the RPMFile and will extract all informations. |
void | setFile(File fh)
Set the file this RPMFile should represent
|
void | setLocale(int pos)
Set the locale as int for all I18N strings that are returned by
getTag(). |
void | setLocale(String locale)
Set the locale as string for all I18N strings that are returned by
getTag(). |
String | toXML()
Same as doing toXML(true).
|
String | toXML(boolean excludePayload)
Returns an XML version of this file
|
void | toXML(Writer writer, boolean excludePayload)
Outputs this rpm in an XML format to the specified i/o writer.
|
Parameters: fh The file object representing a rpm file
Returns: The rpm header
Returns: An array of all tag names
Returns: The rpm lead
Returns: A string array of all defined locales
Returns: The rpm signature
Parameters: tag A tag id as a Long
Returns: A data struct containing the data of this tag
Parameters: tag A tag id as a long
Returns: A data struct containing the data of this tag
Parameters: tagname A tag name
Returns: A data struct containing the data of this tag
Parameters: tagname A RPM tag name
Returns: The id of the RPM tag
Throws: IllegalArgumentException if the tag name was not found
See Also: getTagIdForName
Returns: All tag ids contained in this rpm file.
Parameters: tagid A RPM tag id
Returns: The name of the RPM tag
Throws: IllegalArgumentException if the tag id was not found
See Also: Header
Returns: All tag names contained in this rpm file.
Parameters: file RPM file.
Throws: IOException If an error occurs during read of the rpm file
Parameters: fh The file object representing a rpm file
Parameters: pos The position in the array returned by getLocales().
Parameters: locale A locale matching a locale returned by getLocales()
Throws: IllegalArgumentException If the locale is not defined by getLocales().
Returns: String containing the XML representation of this RPM.
See Also: RPMFile
Parameters: excludePayload If this is true, the payload will not be included in the XML.
Returns: XML rpm.
Parameters: writer Writer stream. excludePayload If this is true, the payload will not be included in the XML.
Throws: IOException If an error occurred writing to the writer.