com.ibm.dse.base
Class CodeSetTranslator
java.lang.Object
|
+--com.ibm.dse.base.FormatElement
|
+--com.ibm.dse.base.FormatDecorator
|
+--com.ibm.dse.base.CodeSetTranslator
- public class CodeSetTranslator
- extends FormatDecorator
This class translates the decorated string to the code set specified
by its attribute toCodeSet.
- See Also:
- Serialized Form
Constructor Summary |
CodeSetTranslator()
This constructor creates a CodeSetTranslator object. |
CodeSetTranslator(java.lang.String aName)
This constructor creates a new instance of the CodeSetTranslator class,
which is obtained from the external definition files through aName. |
Method Summary |
java.lang.String |
addDecoration(java.lang.String aString)
Converts aString to the code set specified by toCodeSet. |
java.lang.String |
getFromCodeSet()
Returns the value of fromCodeSet. |
java.lang.String |
getToCodeSet()
Returns the value of toCodeSet. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a CodeSetTranslator with the aTag attributes. |
java.lang.String |
removeDecoration(java.lang.String aString)
Converts aString from the code set specified for toCodeSet to the default locale. |
void |
setFromCodeSet(java.lang.String aCodeSet)
Sets the value of fromCodeSet. |
void |
setToCodeSet(java.lang.String aCodeSet)
Sets the value of toCodeSet. |
Vector |
toStrings()
Returns a visual representation of this decorator. |
Methods inherited from class com.ibm.dse.base.FormatDecorator |
extract,
format,
format,
getDataElementName,
getDecorated,
getName,
isConstant,
rootDecorated,
rootDecorator,
setDecorated,
toString,
unformat,
unformat |
Methods inherited from class com.ibm.dse.base.FormatElement |
exceptionInfo,
externalizer,
format,
getExternalizer,
getTagName,
isCacheable,
readExternal,
readExternal,
readObject,
reinitialize,
removeExternal,
setDataElementName,
setExternalizer,
setName,
setSize,
toTags,
unformat,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
toCodeSet
protected java.lang.String toCodeSet
fromCodeSet
protected java.lang.String fromCodeSet
CodeSetTranslator
public CodeSetTranslator()
- This constructor creates a CodeSetTranslator object.
CodeSetTranslator
public CodeSetTranslator(java.lang.String aName)
throws java.io.IOException
- This constructor creates a new instance of the CodeSetTranslator class,
which is obtained from the external definition files through aName.
- Parameters:
aName
- java.lang.String
addDecoration
public java.lang.String addDecoration(java.lang.String aString)
throws DSEInvalidArgumentException
- Converts aString to the code set specified by toCodeSet.
- Overrides:
- addDecoration in class FormatDecorator
- Parameters:
aString
- String- Returns:
- String
getFromCodeSet
public java.lang.String getFromCodeSet()
- Returns the value of fromCodeSet.
- Returns:
- int
getToCodeSet
public java.lang.String getToCodeSet()
- Returns the value of toCodeSet.
- Returns:
- int
initializeFrom
public java.lang.Object initializeFrom(Tag aTag)
- Initializes a CodeSetTranslator with the aTag attributes.
- Overrides:
- initializeFrom in class FormatElement
- Parameters:
aTag
- com.ibm.dse.base.Tag
removeDecoration
public java.lang.String removeDecoration(java.lang.String aString)
throws DSEInvalidArgumentException
- Converts aString from the code set specified for toCodeSet to the default locale.
- Overrides:
- removeDecoration in class FormatDecorator
- Tags copied from class: FormatDecorator
- Parameters:
aString
- String- Returns:
- java.lang.String
setFromCodeSet
public void setFromCodeSet(java.lang.String aCodeSet)
- Sets the value of fromCodeSet.
- Parameters:
aCodeSet
- String
setToCodeSet
public void setToCodeSet(java.lang.String aCodeSet)
- Sets the value of toCodeSet.
- Parameters:
aCodeSet
- String
toStrings
public Vector toStrings()
- Returns a visual representation of this decorator.
- Overrides:
- toStrings in class FormatDecorator
- Returns:
- java.lang.Vector