|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.FormatElement
com.ibm.btt.base.FieldFormat
com.ibm.btt.base.IntegerFormat
@ATTR(value={"size#String#IMPLIED","signRule#Boolean#IMPLIED","byteOrdering#String#IMPLIED"}) public class IntegerFormat
This class formats an Integer or a Long into its internal byte-representation as a String.
Field Summary |
---|
Fields inherited from class com.ibm.btt.base.FormatElement |
---|
dataElementName, externalizer, name |
Constructor Summary | |
---|---|
IntegerFormat()
This is the default constructor used to create an IntegerFormat object. |
|
IntegerFormat(java.lang.String aName)
This constructor creates an IntegerFormat object with the specified name. |
Method Summary | |
---|---|
java.lang.String[] |
extract(java.lang.String aString)
Extracts the String according its size attribute. |
java.lang.String |
format(long aValue)
Returns the integer's binary representation in a chain of bytes provided. |
java.lang.String |
formatField(DataField aDataField)
Accesses the value of the DataField and checks that it is a valid integer. |
int |
getByteOrdering()
Returns the value of byteOrdering. |
boolean |
getSign()
Returns the value of sign. |
int |
getSize()
Returns the value of size. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes an IntegerFormat with the aTag attributes. |
long |
parse(java.lang.String aString)
Converts aString to a char[] and then converts the char[] to a Java long. |
void |
setByteOrdering(int anInt)
Sets the value of byteOrdering. |
void |
setSign(boolean useSign)
Sets the sign. |
void |
setSize(int aSize)
Sets the value of size. |
java.lang.String |
toString()
Converts the IntegerFormat to a String. |
int |
unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
DataElement aDataElement)
The new unformat methods added to the FormatElement to minimize the instances created during the unfomat process that later will be collected by the garbage collector (GC). |
DataField |
unformatField(java.lang.String aString,
DataField aDataField)
Updates the DataField value by interpreting the input string. |
Methods inherited from class com.ibm.btt.base.FieldFormat |
---|
format, format, toStrings, unformat, unformat |
Methods inherited from class com.ibm.btt.base.FormatElement |
---|
checkIndexes, exceptionInfo, externalizer, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, toTags, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntegerFormat()
public IntegerFormat(java.lang.String aName) throws java.io.IOException
aName
- java.lang.String
java.io.IOException
Method Detail |
---|
public java.lang.String[] extract(java.lang.String aString) throws DSEInvalidArgumentException
extract
in class FormatElement
aString
- String
DSEInvalidArgumentException
public java.lang.String format(long aValue) throws DSEInvalidArgumentException
aValue
- long
DSEInvalidArgumentException
public java.lang.String formatField(DataField aDataField) throws DSEInvalidArgumentException, DSEInvalidClassException
formatField
in class FieldFormat
aDataField
- DataField
DSEInvalidArgumentException
DSEInvalidClassException
public int getByteOrdering()
public boolean getSign()
public int getSize()
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in class FormatElement
aTag
- com.ibm.btt.base.Tag
java.io.IOException
public long parse(java.lang.String aString) throws DSEInvalidArgumentException
aString
- java.lang.String
DSEInvalidArgumentException
public void setByteOrdering(int anInt)
public void setSign(boolean useSign)
useSign
- booleanpublic void setSize(int aSize)
setSize
in class FormatElement
aSize
- intpublic java.lang.String toString()
toString
in class FormatElement
public DataField unformatField(java.lang.String aString, DataField aDataField) throws DSEInvalidArgumentException
unformatField
in class FieldFormat
aString
- StringaDataField
- DataField
DSEInvalidArgumentException
public int unformat(int ndxFrom, int ndxTo, java.lang.String str, DataElement aDataElement) throws DSEInvalidRequestException, DSEInvalidArgumentException
unformat
in class FieldFormat
ndxFrom
- is the initial indexndxTo
- one is the final index
DSEInvalidRequestException
DSEInvalidArgumentException
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |