com.jguild.jrpm.io.datatype
public final class TypeFactory extends Object
Version: $Id: TypeFactory.java,v 1.4 2005/11/11 08:27:40 mkuss Exp $
Method Summary | |
---|---|
static BIN | createBIN(byte[] data)
Create a data object of type BIN
|
static CHAR | createCHAR(char[] data)
Create a data object of type CHAR
|
static DataTypeIf | createFromStream(DataInputStream inputStream, IndexEntry indexEntry, long length)
This method creates a rpm data type out of a input stream and an
IndexEntry. |
static I18NSTRING | createI18NSTRING(String[] str)
Create a data object of type I18NSTRING
|
static INT16 | createINT16(short[] data)
Create a data object of type INT16
|
static INT32 | createINT32(int[] data)
Create a data object of type INT32
|
static INT64 | createINT64(long[] data)
Create a data object of type INT64
|
static INT8 | createINT8(byte[] data)
Create a data object of type INT8
|
static NULL | createNULL(int size)
Create a data object of type NULL
|
static STRING | createSTRING(String str)
Create a data object of type STRING
|
static STRING_ARRAY | createSTRING_ARRAY(String[] str)
Create a data object of type STRING_ARRAY
|
Parameters: data The raw data
Returns: The BIN object
Parameters: data The raw data
Returns: The CHAR object
Parameters: inputStream The input stream indexEntry The IndexEntry that should be read length The number of bytes to read for string objects
Returns: One of the rpm data types coresponding with the type contained in the IndexEntry.
Throws: IOException if something was wrong during reading of the input stream
Parameters: str An array of language strings
Returns: The I18NSTRING object
Parameters: data The raw data
Returns: The INT16 object
Parameters: data The raw data
Returns: The INT32 object
Parameters: data The raw data
Returns: The INT64 object
Parameters: data The raw data
Returns: The INT8 object
Parameters: size The length of the entry
Returns: The NULL object
Parameters: str A raw string
Returns: The STRING object
Parameters: str Raw strings
Returns: The STRING_ARRAY object