|
IBM Branch 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
This decorator prepends a String with the byte-representation of the size of the String.
Field Summary | |
---|---|
int |
byteOrdering
|
boolean |
lengthIncluded
|
boolean |
lengthRepresentation
|
int |
size
|
Fields inherited from class com.ibm.btt.base.FormatDecorator |
---|
decorated |
Fields inherited from class com.ibm.btt.base.FormatElement |
---|
dataElementName, externalizer, name |
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. |
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 |
---|
exceptionInfo, externalizer, getExternalizer, getTagName, isCacheable, 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 interface Externalizable
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 interface Externalizable
toStrings
in class FormatDecorator
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |