com.jguild.jrpm.io
Class RPMLead

java.lang.Object
  extended by com.jguild.jrpm.io.RPMLead

public class RPMLead
extends java.lang.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(java.io.DataInputStream inputStream)
           
 
Method Summary
 LeadArchitecture getArchitecture()
          Get the architecture of a rpm
 int getMajorVersion()
          Get the major number of the rpm version a rpm is build for
 int getMinorVersion()
          Get the minor number of the rpm version a rpm is build for
 java.lang.String getName()
          Get the name of this rpm.
 LeadOS getOperationSystem()
          Get the operation system a rpm is build for
 LeadSignature getSignatureType()
          Get the type of signature this rpm provides
 long getSize()
          Get the size of this structure in bytes (as defined for a rpm file)
 LeadType getType()
          Get the type of a rpm file (binary or source)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPMLead

protected RPMLead(java.io.DataInputStream inputStream)
           throws java.io.IOException
Throws:
java.io.IOException
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 java.lang.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