com.jguild.jrpm.io.datatype
Class I18NSTRING

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

public class I18NSTRING
extends java.lang.Object
implements DataTypeIf

A representation of a rpm I18N string data object

Author:
kuss

Constructor Summary
(package private) I18NSTRING(java.lang.String[] data)
           
 
Method Summary
 java.lang.Object get(int i)
          Gets the i-th element of this object.
 java.lang.String[] getData()
          Get the rpm I18N string array as a java string 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 I18NSTRING readFromStream(java.io.DataInputStream inputStream, IndexEntry indexEntry, long length)
          Constructs a type froma stream
 void setLocaleIndex(int index)
          Set the locale that should be returned by toString()
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

I18NSTRING

I18NSTRING(java.lang.String[] data)
Method Detail

getData

public java.lang.String[] getData()
Get the rpm I18N string array as a java string array

Returns:
An array of I18N strings (as defined in the tag HEADERI18NTABLE)

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

setLocaleIndex

public void setLocaleIndex(int index)
Set the locale that should be returned by toString()

Parameters:
index - The index of the I18N string array. This should match the tag HEADERI18NTABLE.

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 I18NSTRING readFromStream(java.io.DataInputStream inputStream,
                                        IndexEntry indexEntry,
                                        long length)
                                 throws java.io.IOException
Constructs a type froma stream

Parameters:
inputStream - An input stream
indexEntry - The index informations
length - the length of the data
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.