|
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.FormatDecorator
com.ibm.btt.base.SelfLength
@ATTR(value={"size#Integer#IMPLIED","byteOrdering#String#IMPLIED","lengthIncluded#Boolean#IMPLIED","lengthRepresentation#String#IMPLIED"}) public class SelfLength
This decorator prepends a String with the byte-representation of the size of the String.
Field Summary | |
---|---|
int |
byteOrdering
The sign decides the byte ordering. |
boolean |
lengthIncluded
The property indicates whether the length is included in field length. |
boolean |
lengthRepresentation
The property indicates the representation form of the length. |
int |
size
The size of the unformatted result. |
Fields inherited from class com.ibm.btt.base.FormatDecorator |
---|
decorated |
Fields inherited from class com.ibm.btt.base.FormatElement |
---|
dataElementName, externalizer, name, xmlSupport |
Constructor Summary | |
---|---|
SelfLength()
This is the default constructor used to create a SelfLength object. |
|
SelfLength(java.lang.String aName)
This is the constructor used by the Externalizer to create a SelfLength object. |
Method Summary | |
---|---|
java.lang.String |
addDecoration(java.lang.String aString)
Prepends the length of the formatted String as an unsigned integer to the String. |
java.lang.String[] |
extract(java.lang.String aString)
Extracts (strips) the substring corresponding to the format element from the input String and returns it and the remaining String as the elements of an array. |
int |
getByteOrdering()
Returns the value of byteOrdering. |
boolean |
getLengthIncluded()
Returns true if the length of the decorator is included in the length of the String. |
boolean |
getLengthRepresentation()
Gets the value of the lengthRepresentation parameter. |
int |
getSize()
Returns the size of the String. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a SelfLength object with the aTag attributes. |
java.lang.String |
removeDecoration(java.lang.String aString)
Removes the size chars from the input String. |
void |
setByteOrdering(int anInt)
Sets the value of byteOrdering. |
void |
setLengthIncluded(boolean aBoolean)
Sets the value of the lengthIncluded attribute. |
void |
setLengthRepresentation(boolean aBoolean)
Sets the value of the lengthRepresentation attribute. |
void |
setSize(int anInt)
Sets the size of the decorating string. |
Vector |
toStrings()
Returns a visual representation of this decorator. |
int |
unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
Context ctx)
Unformat strings that between ndxFrom and ndxTo into the Context. |
int |
unformat(int ndxFrom,
int ndxTo,
java.lang.String str,
DataElement de)
Unformat strings that between ndxFrom and ndxTo into the DataElement. |
Methods inherited from class com.ibm.btt.base.FormatDecorator |
---|
format, format, getDataElementName, getDecorated, getName, isConstant, isItConstant, reinitialize, rootDecorated, rootDecorator, setDecorated, toString, unformat, unformat |
Methods inherited from class com.ibm.btt.base.FormatElement |
---|
checkIndexes, exceptionInfo, externalizer, getAttributeValueForXMLFormat, getExternalizer, getTagName, isCacheable, isNull, readExternal, readExternal, readObject, removeExternal, setDataElementName, setExternalizer, setName, toTags, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int size
public int byteOrdering
public boolean lengthIncluded
public boolean lengthRepresentation
Constructor Detail |
---|
public SelfLength()
public SelfLength(java.lang.String aName) throws java.io.IOException
aName
- java.lang.String
java.io.IOException
Method Detail |
---|
public java.lang.String addDecoration(java.lang.String aString) throws DSEInvalidArgumentException
addDecoration
in class FormatDecorator
aString
- java.lang.String
DSEInvalidArgumentException
public java.lang.String[] extract(java.lang.String aString) throws DSEInvalidArgumentException
extract
in class FormatDecorator
aString
- java.lang.String
DSEInvalidArgumentException
public int getByteOrdering()
public boolean getLengthIncluded()
public boolean getLengthRepresentation()
public int getSize()
public java.lang.Object initializeFrom(Tag aTag)
initializeFrom
in class FormatElement
aTag
- com.ibm.btt.base.Tag
public java.lang.String removeDecoration(java.lang.String aString) throws DSEInvalidArgumentException
removeDecoration
in class FormatDecorator
aString
- java.lang.String
DSEInvalidArgumentException
public void setByteOrdering(int anInt)
anInt
- intpublic void setLengthIncluded(boolean aBoolean)
aBoolean
- booleanpublic void setLengthRepresentation(boolean aBoolean)
aBoolean
- booleanpublic void setSize(int anInt)
setSize
in class FormatElement
anInt
- intpublic Vector toStrings()
toStrings
in class FormatDecorator
public int unformat(int ndxFrom, int ndxTo, java.lang.String str, Context ctx) throws DSEInvalidRequestException, DSEInvalidArgumentException
unformat
in class FormatElement
str
- java.lang.StringndxFrom
- intndxTo
- intctx
- com.ibm.btt.base.Context;
DSEInvalidRequestException
DSEInvalidArgumentException
public int unformat(int ndxFrom, int ndxTo, java.lang.String str, DataElement de) throws DSEInvalidRequestException, DSEInvalidArgumentException
unformat
in class FormatElement
str
- java.lang.StringndxFrom
- intndxTo
- intde
- com.ibm.btt.base.DataElement;
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 |