com.jguild.jrpm.io
Class IndexEntry

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.5 2004/05/06 20:59:22 mkuss Exp $

Constructor Summary
IndexEntry(java.io.DataInputStream inputStream)
          Constructs a IndexEntry out of a InputStream.
 
Method Summary
 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
 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
 

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.

Parameters:
inputStream - An InputStream containing a rpm file.
Throws:
java.io.IOException - If an error occurs during reading from stream
Method Detail

getCount

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

Returns:
The number of elements

getOffset

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

Returns:
The offset

getSize

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

Returns:
The size

getTag

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

Returns:
The tag id

getType

public RPMIndexType getType()
Get the data type of this entry

Returns:
The data type


Copyright © 2002-2005 Sourceforge. All Rights Reserved.