com.jguild.jrpm.io

Class RPMLead

public class RPMLead extends Object

The Java Version of the C struct for the lead.

C struct :
 struct rpmlead {
    unsigned char magic[4];
    unsigned char major, minor;
    short type;            (2 byte)
    short archnum;         (2 byte)
    char name[66];
    short osnum;           (2 byte)
    short signature_type;  (2 byte)
    char reserved[16];
 } ;

Version: $Id: RPMLead.java,v 1.6 2003/10/20 16:32:11 mkuss Exp $

Constructor Summary
protected RPMLead(DataInputStream inputStream)
Method Summary
LeadArchitecturegetArchitecture()
Get the architecture of a rpm
intgetMajorVersion()
Get the major number of the rpm version a rpm is build for
intgetMinorVersion()
Get the minor number of the rpm version a rpm is build for
StringgetName()
Get the name of this rpm.
LeadOSgetOperationSystem()
Get the operation system a rpm is build for
LeadSignaturegetSignatureType()
Get the type of signature this rpm provides
longgetSize()
Get the size of this structure in bytes (as defined for a rpm file)
LeadTypegetType()
Get the type of a rpm file (binary or source)

Constructor Detail

RPMLead

protected RPMLead(DataInputStream inputStream)

Method Detail

getArchitecture

public LeadArchitecture getArchitecture()
Get the architecture of a rpm

Returns: the architecture

getMajorVersion

public int getMajorVersion()
Get the major number of the rpm version a rpm is build for

Returns: The major number

getMinorVersion

public int getMinorVersion()
Get the minor number of the rpm version a rpm is build for

Returns: The minor number

getName

public String getName()
Get the name of this rpm. This field has a maximum length of 65 characters + one for the ending \0 for c strings.

Returns: The name

getOperationSystem

public LeadOS getOperationSystem()
Get the operation system a rpm is build for

Returns: The operation system

getSignatureType

public LeadSignature getSignatureType()
Get the type of signature this rpm provides

Returns: The signature

getSize

public final long getSize()
Get the size of this structure in bytes (as defined for a rpm file)

Returns: The size (96 bytes)

getType

public LeadType getType()
Get the type of a rpm file (binary or source)

Returns: The type