com.jguild.jrpm.io.datatype
Class STRING

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

public class STRING
extends java.lang.Object
implements DataTypeIf

A representation of a rpm string data object

Author:
kuss

Constructor Summary
(package private) STRING(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 string as a java string
 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 STRING readFromStream(java.io.DataInputStream inputStream, IndexEntry indexEntry, long length)
          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

STRING

STRING(java.lang.String data)
Method Detail

getData

public java.lang.String getData()
Get the rpm string as a java string

Returns:
A string

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 STRING 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.