com.jguild.jrpm.io
Class RPMHeader

java.lang.Object
  extended bycom.jguild.jrpm.io.Header
      extended bycom.jguild.jrpm.io.RPMHeader

public class RPMHeader
extends Header

RPM Header.

Version:
$Id: RPMHeader.java,v 1.7 2004/09/09 09:52:48 pnasrat Exp $

Field Summary
 
Fields inherited from class com.jguild.jrpm.io.Header
size
 
Constructor Summary
RPMHeader(java.io.DataInputStream inputStream)
          Creates a new RPMHeader object out of an input stream.
RPMHeader(java.io.DataInputStream inputStream, boolean raw)
           
 
Method Summary
static java.lang.String[] getKnownTagNames()
          Read all known tag names for this header structure.
 long getTagIdForName(java.lang.String tagname)
          Read a tag with a given tag name.
 java.lang.String getTagNameForId(long tagid)
          Read a tag with a given tag id.
 boolean isValidTag(long tagid)
          Test if the given tagid is associated with a valid tag
 boolean isValidTag(java.lang.String tagname)
          Test if the given tagname is associated with a valid tag
 
Methods inherited from class com.jguild.jrpm.io.Header
getSize, getTag, getTag, getTag, getTagIds, getTagNames, setTag, setTag, setTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPMHeader

public RPMHeader(java.io.DataInputStream inputStream)
          throws java.io.IOException
Creates a new RPMHeader object out of an input stream.

Parameters:
inputStream - The input stream
Throws:
java.io.IOException - if an error occured during read of the rpm

RPMHeader

public RPMHeader(java.io.DataInputStream inputStream,
                 boolean raw)
          throws java.io.IOException
Method Detail

getKnownTagNames

public static java.lang.String[] getKnownTagNames()
Description copied from class: Header
Read all known tag names for this header structure.


getTagIdForName

public long getTagIdForName(java.lang.String tagname)
Description copied from class: Header
Read a tag with a given tag name. The tag will be read out of the class defined in getTagEnum().

Specified by:
getTagIdForName in class Header
Parameters:
tagname - A RPM tag name
Returns:
The id of the RPM tag

getTagNameForId

public java.lang.String getTagNameForId(long tagid)
Description copied from class: Header
Read a tag with a given tag id. The tag will be read out of the class defined in getTagEnum().

Specified by:
getTagNameForId in class Header
Parameters:
tagid - A RPM tag id
Returns:
The name of the RPM tag

isValidTag

public boolean isValidTag(long tagid)
Description copied from class: Header
Test if the given tagid is associated with a valid tag

Specified by:
isValidTag in class Header
Parameters:
tagid - The id of a tag
Returns:
TRUE if the tagid is valid

isValidTag

public boolean isValidTag(java.lang.String tagname)
Description copied from class: Header
Test if the given tagname is associated with a valid tag

Specified by:
isValidTag in class Header
Parameters:
tagname - The name of a tag
Returns:
TRUE if the tagname is valid


Copyright © 2002-2005 Sourceforge. All Rights Reserved.