com.ibm.dse.base.types.ext
Class StringConverter
java.lang.Object
|
+--com.ibm.dse.base.types.AbstractConverter
|
+--com.ibm.dse.base.types.ext.StringConverter
- public class StringConverter
- extends AbstractConverter
Converter for business objects of Type String
- See Also:
- Serialized Form
|
Constructor Summary |
StringConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
This constructor creates a StringConverter which supports the conversion types passed as
argument. |
|
Method Summary |
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor)
The value passed as an Object is formatted using the specified conversion type and written
to the writer passed as argument |
void |
formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
java.util.Locale locale)
The value passed as an Object is formatted using the specified conversion type, locale and writer
passed as argument. |
java.lang.Object |
unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor)
Converts the stream passed to a String using the appropriate conversion Type. |
java.lang.Object |
unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor,
java.util.Locale locale)
Uses the reader passed to construct an Object of the correct Type using the
appropriate conversion type and locale. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
StringConverter
public StringConverter(java.lang.String[] supportedConversionTypes,
java.util.Hashtable keyValuePairs)
throws DSETypeException
- This constructor creates a StringConverter which supports the conversion types passed as
argument.
- Parameters:
supportedConversionTypes - String[]keyValuePairs - Hashtable- Throws:
- DSETypeException - Conversion types passed to superclass is null or empty.
formatToWriterForType
public void formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor)
throws java.io.IOException
- The value passed as an Object is formatted using the specified conversion type and written
to the writer passed as argument
- Overrides:
- formatToWriterForType in class AbstractConverter
- Parameters:
value - ObjectconversionType - Stringwriter - Writerdescriptor - PropertyDescription- Throws:
- java.io.IOException - if an I/O error occurs
formatToWriterForType
public void formatToWriterForType(java.lang.Object value,
java.lang.String conversionType,
java.io.Writer writer,
PropertyDescription descriptor,
java.util.Locale locale)
throws java.io.IOException
- The value passed as an Object is formatted using the specified conversion type, locale and writer
passed as argument.
- Overrides:
- formatToWriterForType in class AbstractConverter
- Parameters:
value - Objectdescriptor - PropertyDescriptorwriter - Writerdescriptor - PropertyDescriptionlocale - Locale- Throws:
- java.io.IOException - if an I/O error occurs
unformatFromReaderForType
public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor)
throws java.io.IOException
- Converts the stream passed to a String using the appropriate conversion Type.
- Overrides:
- unformatFromReaderForType in class AbstractConverter
- Parameters:
reader - ReaderconversionType - Stringdescriptor - PropertyDescription- Returns:
- Object
- Throws:
- java.io.IOException - if an I/O error occurs
unformatFromReaderForType
public java.lang.Object unformatFromReaderForType(java.io.Reader reader,
java.lang.String conversionType,
PropertyDescription descriptor,
java.util.Locale locale)
throws java.io.IOException
- Uses the reader passed to construct an Object of the correct Type using the
appropriate conversion type and locale.
- Overrides:
- unformatFromReaderForType in class AbstractConverter
- Parameters:
reader - ReaderconversionType - Stringdescriptor - PropertyDescriptionlocale - Locale- Throws:
- java.io.IOException - if an I/O error occurs