java.lang.Object
com.jguild.jrpm.io.IndexEntry
- public class IndexEntry
- extends java.lang.Object
RPM Index Entry (16 byte).
-
tag; what the data is for (4 bytes)
-
type; what type of data is stored (see RPMFileType.java) (4 bytes)
-
offset; where to the data begins (4 bytes)
-
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 $
|
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 |
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
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.
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