com.jguild.jrpm.io
public abstract class Header extends Object
Version: $Id: Header.java,v 1.10 2004/09/09 09:52:33 pnasrat Exp $
Field Summary | |
---|---|
protected long | size
The size in bytes of this structure. |
Constructor Summary | |
---|---|
Header(DataInputStream inputStream, boolean rawHeader)
Create a header structure from an input stream.
| |
Header(DataInputStream inputStream)
Construct a header structure for the given input stream.
|
Method Summary | |
---|---|
static String[] | getKnownTagNames()
Read all known tag names for this header structure.
|
long | getSize()
Get the size in bytes of this structure
|
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
|
abstract long | getTagIdForName(String tagname)
Read a tag with a given tag name. |
long[] | getTagIds()
Get all tag ids contained in this rpm file.
|
abstract String | getTagNameForId(long tagid)
Read a tag with a given tag id. |
String[] | getTagNames()
Get all tag names contained in this rpm file.
|
abstract boolean | isValidTag(long tagid)
Test if the given tagid is associated with a valid tag
|
abstract boolean | isValidTag(String tagname)
Test if the given tagname is associated with a valid tag
|
void | setTag(Long tag, DataTypeIf data)
Set a tag by id as a Long
|
void | setTag(long tag, DataTypeIf data)
Set a tag by id as a long
|
void | setTag(String tagname, DataTypeIf data)
Set a tag by id as a string
|
byte magic[3]; (3 byte) (8e ad e8)
int version; (1 byte)
byte reserved[4]; (4 byte)
long num_index; (4 byte)
long num_data; (4 byte)
Afterwards the index entries are read and then the tags and the
correspondig data entries are read.
Parameters: inputStream An inputstream containing rpm file informations rawHeader Are we a raw header (from headerUnload or rpmdb)
Throws: IOException if an error occurs on reading informations out of the stream
Parameters: inputStream
Throws: IOException
Returns: An array of tag names
Returns: The size in bytes.
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
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
Returns: All tag names contained in this rpm file.
Parameters: tagid The id of a tag
Returns: TRUE if the tagid is valid
Parameters: tagname The name of a tag
Returns: TRUE if the tagname is valid
Parameters: tag A tag id as a Long data A data struct containing the data of this tag
Parameters: tag A tag id as a long data A data struct containing the data of this tag
Parameters: tagname A tag id as a string data A data struct containing the data of this tag