Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.jguild.jrpm.io
Class RPMLead  view RPMLead download RPMLead.java

java.lang.Object
  extended bycom.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 $

Field Summary
private  com.jguild.jrpm.io.constant.LeadArchitecture arch
           
private static org.apache.log4j.Logger logger
           
private  int major
           
private  int minor
           
private  java.lang.String name
           
private  com.jguild.jrpm.io.constant.LeadOS os
           
private  com.jguild.jrpm.io.constant.LeadSignature sigType
           
private  com.jguild.jrpm.io.constant.LeadType type
           
 
Constructor Summary
protected RPMLead(java.io.DataInputStream inputStream)
           
 
Method Summary
private static void check(boolean test)
           
 com.jguild.jrpm.io.constant.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.
 com.jguild.jrpm.io.constant.LeadOS getOperationSystem()
          Get the operation system a rpm is build for
 com.jguild.jrpm.io.constant.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)
 com.jguild.jrpm.io.constant.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
 

Field Detail

logger

private static final org.apache.log4j.Logger logger

arch

private com.jguild.jrpm.io.constant.LeadArchitecture arch

os

private com.jguild.jrpm.io.constant.LeadOS os

sigType

private com.jguild.jrpm.io.constant.LeadSignature sigType

type

private com.jguild.jrpm.io.constant.LeadType type

name

private java.lang.String name

major

private int major

minor

private int minor
Constructor Detail

RPMLead

protected RPMLead(java.io.DataInputStream inputStream)
           throws java.io.IOException
Method Detail

getArchitecture

public com.jguild.jrpm.io.constant.LeadArchitecture getArchitecture()
Get the architecture of a rpm


getMajorVersion

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


getMinorVersion

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


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.


getOperationSystem

public com.jguild.jrpm.io.constant.LeadOS getOperationSystem()
Get the operation system a rpm is build for


getSignatureType

public com.jguild.jrpm.io.constant.LeadSignature getSignatureType()
Get the type of signature this rpm provides


getSize

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


getType

public com.jguild.jrpm.io.constant.LeadType getType()
Get the type of a rpm file (binary or source)


check

private static final void check(boolean test)
                         throws java.io.IOException