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

Quick Search    Search Deep

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

java.lang.Object
  extended bycom.jguild.jrpm.io.IndexEntry

public class IndexEntry
extends java.lang.Object

RPM Index Entry (16 byte).

  1. tag; what the data is for (4 bytes)
  2. type; what type of data is stored (see RPMFileType.java) (4 bytes)
  3. offset; where to the data begins (4 bytes)
  4. count; how much data of the type is there (4 bytes)

Version:
$Id: IndexEntry.java,v 1.4 2003/10/13 19:11:48 mkuss Exp $

Field Summary
private  long count
           
private static int INDEX_LENGTH
           
private static org.apache.log4j.Logger logger
           
private  long offset
           
private  long tag
           
private  com.jguild.jrpm.io.constant.RPMIndexType type
           
 
Constructor Summary
IndexEntry(java.io.DataInputStream inputStream)
          Constructs a IndexEntry out of a InputStream.
 
Method Summary
private static void check(boolean test)
          Asserts a boolean value and throws an exception if it is false
 long getCount()
          Get the number of elements of this data type
 long getOffset()
          Returns the offset of this data type
 int getSize()
          Get the size of this index entry in bytes
 long getTag()
          Get the tag id as a long
 com.jguild.jrpm.io.constant.RPMIndexType getType()
          Get the data type of this entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_LENGTH

private static final int INDEX_LENGTH
See Also:
Constant Field Values

logger

private static final org.apache.log4j.Logger logger

type

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

count

private long count

offset

private long offset

tag

private long tag
Constructor Detail

IndexEntry

public IndexEntry(java.io.DataInputStream inputStream)
           throws java.io.IOException
Constructs a IndexEntry out of a InputStream. This will read the tag id, the data type, the offset of the data and the number of elements of data. Note that the number of elements varies in its meaning depending on the data type.

Method Detail

getCount

public long getCount()
Get the number of elements of this data type


getOffset

public long getOffset()
Returns the offset of this data type


getSize

public int getSize()
Get the size of this index entry in bytes


getTag

public long getTag()
Get the tag id as a long


getType

public com.jguild.jrpm.io.constant.RPMIndexType getType()
Get the data type of this entry


check

private static final void check(boolean test)
                         throws java.io.IOException
Asserts a boolean value and throws an exception if it is false