com.jguild.jrpm.io.datatype
Interface DataTypeIf

All Known Implementing Classes:
BIN, CHAR, I18NSTRING, INT16, INT32, INT64, INT8, NULL, STRING, STRING_ARRAY

public interface DataTypeIf

Global interface for all RPM data types.

Version:
$Id: DataTypeIf.java,v 1.3 2005/11/11 08:27:40 mkuss Exp $
Author:
kuss

Method Summary
 java.lang.Object get(int i)
          Gets the i-th element of this object.
 java.lang.Object getDataObject()
          Get the data as an object.
 long getElementCount()
          Returns the number of elements stored in this data type.
 long getSize()
          Returns the size of this type in the RPM file
 RPMIndexType getType()
          Get the type of this data object
 boolean isArray()
          Returns TRUE if this object contains an array or FALSE if it is not an array.
 

Method Detail

isArray

boolean isArray()
Returns TRUE if this object contains an array or FALSE if it is not an array.

Returns:
TRUE if this object contains an array

getDataObject

java.lang.Object getDataObject()
Get the data as an object.

Returns:
The object

getElementCount

long getElementCount()
Returns the number of elements stored in this data type.

Returns:
The number of elements

getSize

long getSize()
Returns the size of this type in the RPM file

Returns:
The size in bytes

getType

RPMIndexType getType()
Get the type of this data object

Returns:
The type

get

java.lang.Object get(int i)
Gets the i-th element of this object.

Parameters:
i - The element number
Returns:
The object
Throws:
java.lang.IndexOutOfBoundsException - if i doesn't fit into the array