com.jguild.jrpm.io.datatype
Class INT32

java.lang.Object
  extended bycom.jguild.jrpm.io.datatype.INT32
All Implemented Interfaces:
DataTypeIf

public class INT32
extends java.lang.Object
implements DataTypeIf

A representation of a rpm 32 byte integer array data object

Author:
kuss

Constructor Summary
(package private) INT32(int[] data)
           
 
Method Summary
 java.lang.Object get(int i)
          Gets the i-th element of this object.
 int[] getData()
          Get the rpm int32 array as a java int array
 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.
static INT32 readFromStream(java.io.DataInputStream inputStream, IndexEntry indexEntry)
          Constructs a type froma stream
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

INT32

INT32(int[] data)
Method Detail

getData

public int[] getData()
Get the rpm int32 array as a java int array

Returns:
An array of ints

getDataObject

public java.lang.Object getDataObject()
Description copied from interface: DataTypeIf
Get the data as an object.

Specified by:
getDataObject in interface DataTypeIf
Returns:
The object

getType

public RPMIndexType getType()
Description copied from interface: DataTypeIf
Get the type of this data object

Specified by:
getType in interface DataTypeIf
Returns:
The type

readFromStream

public static INT32 readFromStream(java.io.DataInputStream inputStream,
                                   IndexEntry indexEntry)
                            throws java.io.IOException
Constructs a type froma stream

Parameters:
inputStream - An input stream
indexEntry - The index informations
Returns:
The size of the read data
Throws:
java.io.IOException - if an I/O error occurs.

isArray

public boolean isArray()
Description copied from interface: DataTypeIf
Returns TRUE if this object contains an array or FALSE if it is not an array.

Specified by:
isArray in interface DataTypeIf
Returns:
TRUE if this object contains an array

getElementCount

public long getElementCount()
Description copied from interface: DataTypeIf
Returns the number of elements stored in this data type.

Specified by:
getElementCount in interface DataTypeIf
Returns:
The number of elements

getSize

public long getSize()
Description copied from interface: DataTypeIf
Returns the size of this type in the RPM file

Specified by:
getSize in interface DataTypeIf
Returns:
The size in bytes

get

public java.lang.Object get(int i)
Description copied from interface: DataTypeIf
Gets the i-th element of this object.

Specified by:
get in interface DataTypeIf
Parameters:
i - The element number
Returns:
The object

toString

public java.lang.String toString()


Copyright © 2002-2005 Sourceforge. All Rights Reserved.