|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jguild.jrpm.io.RPMFile
This class allows IO access to an RPM file.
Constructor Summary | |
RPMFile()
Creates a new empty RPMFile object. |
|
RPMFile(java.io.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 java.lang.String[] |
getKnownTagNames()
Get all known tags of this rpm file. |
RPMLead |
getLead()
Get the lead section of this rpm file |
java.lang.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(java.lang.Long tag)
Get a tag by id as a Long |
DataTypeIf |
getTag(java.lang.String tagname)
Get a tag by name |
long |
getTagIdForName(java.lang.String tagname)
Read a tag with a given tag name. |
long[] |
getTagIds()
Get all tag ids contained in this rpm file. |
java.lang.String |
getTagNameForId(long tagid)
Read a tag with a given tag id. |
java.lang.String[] |
getTagNames()
Get all tag names contained in this rpm file. |
void |
parse()
Parse the RPMFile and will extract all informations. |
void |
setFile(java.io.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(java.lang.String locale)
Set the locale as string for all I18N strings that are returned by getTag(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RPMFile()
public RPMFile(java.io.File fh)
fh
- The file object representing a rpm fileMethod Detail |
public void setFile(java.io.File fh)
fh
- The file object representing a rpm filepublic void parse() throws java.io.IOException
java.io.IOException
- If an error occurs during read of the rpm filepublic RPMHeader getHeader()
public static java.lang.String[] getKnownTagNames()
public RPMLead getLead()
public void setLocale(int pos)
pos
- The position in the array returned by getLocales().public void setLocale(java.lang.String locale)
locale
- A locale matching a locale returned by getLocales()
java.lang.IllegalArgumentException
- If the locale is not defined by getLocales().public java.lang.String[] getLocales()
public RPMSignature getSignature()
public DataTypeIf getTag(java.lang.Long tag)
tag
- A tag id as a Long
public DataTypeIf getTag(long tag)
tag
- A tag id as a long
public DataTypeIf getTag(java.lang.String tagname)
tagname
- A tag name
public long getTagIdForName(java.lang.String tagname)
tagname
- A RPM tag name
java.lang.IllegalArgumentException
- if the tag name was not foundHeader.getTagIdForName(String)
public long[] getTagIds()
public java.lang.String getTagNameForId(long tagid)
tagid
- A RPM tag id
java.lang.IllegalArgumentException
- if the tag id was not foundHeader.getTagNameForId(long)
public java.lang.String[] getTagNames()
public void close()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |