|
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.types.AbstractConverter
com.ibm.btt.base.types.ext.IntegerConverter
public class IntegerConverter
This is the converter for business objects of the Integer or Long type. The size of its representation can be set from 1 to 8. The byteOrdering attribute determines whether the instance has big-endian (host) or little-endian (PC) byte ordering. The sign attribute determines whether the instance works with or without a sign.
Field Summary | |
---|---|
protected boolean |
binaryConversion
|
Fields inherited from class com.ibm.btt.base.types.AbstractConverter |
---|
keyValuePairs |
Fields inherited from interface com.ibm.btt.base.types.TypeConstants |
---|
amended, CONV_TYPE_DEFAULT, CONV_TYPE_HOST, CONV_TYPE_OUTPUT, CONV_TYPE_SER, CONV_TYPE_XML, disabled, hidden, isAmended, isDisabled, isHidden, isMandatory, isOmitted, isReadOnly, mandatory, omitted, readOnly, TYPE_DEFAULT, TYPE_REGISTRY_INIT_SIZE |
Constructor Summary | |
---|---|
IntegerConverter()
This constructor creates an IntegerConverter object. |
|
IntegerConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
Creates an IntegerConverter object. |
Method Summary | |
---|---|
protected void |
formatToWriter(long value,
java.io.Writer writer,
int aByteOrdering,
int aSize)
|
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
Hashtable parameters)
Formats the Object using the specified conversion type and the writer passed as arguments. |
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
java.util.Locale locale,
Hashtable parameters)
Formats the Object using the specified conversion type, locale, and writer passed as arguments. |
int |
getByteOrdering()
Returns the value of the byteOrdering attribute. |
boolean |
getSign()
Returns the value of the sign attribute. |
int |
getSize()
Returns the value of the size attribute. |
protected long |
parse(java.lang.String aString,
int aByteOrdering,
int aSize,
boolean aSign)
Converts a String to a char[] and then converts the char[] to a Java long. |
protected java.lang.Object |
unformat(java.lang.String integerAsString,
java.lang.String convType,
PropertyDescription descriptor,
java.util.Locale locale)
Converts a String representing an Integer into another Integer. |
protected java.lang.Object |
unformat(java.lang.String integerAsString,
java.lang.String convType,
PropertyDescription descriptor,
java.util.Locale locale,
Hashtable parameters)
Converts a String representing an Integer into another Integer. |
java.lang.Object |
unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor,
Hashtable parameters)
Converts the stream into a Byte, Short, Integer, or Long (depending on the size attribute) using the appropriate conversion Type. |
java.lang.Object |
unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor,
java.util.Locale locale,
Hashtable parameters)
Constructs an Object of the correct type using the appropriate conversion type and locale. |
void |
validateParams(PropertyDescription pd)
Validates the parameters externally defined for this converter. |
Methods inherited from class com.ibm.btt.base.types.AbstractConverter |
---|
convertFrom, convertFrom, convertFrom, convertFrom, convertFrom, convertTo, convertTo, convertTo, convertTo, convertTo, formatToWriter, formatToWriter, formatToWriter, formatToWriterForType, formatToWriterForType, getParameters, getSupportedConversionTypes, readExternal, supportsConversionType, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReader, unformatFromReaderForType, unformatFromReaderForType, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean binaryConversion
Constructor Detail |
---|
public IntegerConverter() throws DSETypeException
DSETypeException
- - If the supportedConversionTypes parameter passed to the superclass is null or emptypublic IntegerConverter(java.lang.String[] supportedConversionTypes, java.util.Hashtable keyValuePairs) throws DSETypeException
supportedConversionTypes
- java.lang.String[]keyValuePairs
- java.util.Hashtable
DSETypeException
- - If conversion types passed to the superclass is null or emptyMethod Detail |
---|
protected void formatToWriter(long value, java.io.Writer writer, int aByteOrdering, int aSize) throws java.io.IOException, DSETypeException
java.io.IOException
DSETypeException
public void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, Hashtable parameters) throws java.io.IOException, DSETypeException
formatToWriterForType
in class AbstractConverter
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptionparameters
- com.ibm.btt.base.Hashtable
java.io.IOException
- - If an I/O error occurs
DSETypeException
- - If formatting is unsuccessfulpublic void formatToWriterForType(java.lang.Object value, java.lang.String conversionType, java.io.Writer writer, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws java.io.IOException, DSETypeException
formatToWriterForType
in class AbstractConverter
value
- ObjectconversionType
- Stringwriter
- Writerdescriptor
- PropertyDescriptorlocale
- Localeparameters
- com.ibm.btt.base.Hashtable
java.io.IOException
- - If an I/O error occurred
DSETypeException
- - If unformatting is unsuccessfulpublic int getByteOrdering()
public boolean getSign()
public int getSize()
protected long parse(java.lang.String aString, int aByteOrdering, int aSize, boolean aSign)
aString
- java.lang.String
protected java.lang.Object unformat(java.lang.String integerAsString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale) throws DSETypeException
unformat
in class AbstractConverter
DSETypeException
protected java.lang.Object unformat(java.lang.String integerAsString, java.lang.String convType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws DSETypeException
unformat
in class AbstractConverter
DSETypeException
public java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, Hashtable parameters) throws java.io.IOException, DSETypeException
unformatFromReaderForType
in class AbstractConverter
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptorparameters
- com.ibm.btt.base.Hashtable
java.io.IOException
- - If an I/O error occurred
DSETypeException
- - If unformatting is unsuccessfulpublic java.lang.Object unformatFromReaderForType(java.io.Reader reader, java.lang.String conversionType, PropertyDescription descriptor, java.util.Locale locale, Hashtable parameters) throws java.io.IOException, DSETypeException
unformatFromReaderForType
in class AbstractConverter
reader
- ReaderconversionType
- Stringdescriptor
- PropertyDescriptionlocale
- Localeparameters
- com.ibm.btt.base.Hashtable
java.io.IOException
- - If an I/O error occurred
DSETypeException
- - If unformatting is unsuccessfulpublic void validateParams(PropertyDescription pd) throws DSETypeException
validateParams
in interface Conversion
validateParams
in class AbstractConverter
pd
- com.ibm.btt.base.types.PropertyDescription
DSETypeException
- - If the parameter validation fails
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |