com.ricebridge.data.sc
Class ByteArrayStringConverter

java.lang.Object
  extended bycom.ricebridge.data.sc.StringConverterSupport
      extended bycom.ricebridge.data.sc.TypeStringConverter
          extended bycom.ricebridge.data.sc.TypeArrayStringConverter
              extended bycom.ricebridge.data.sc.ByteArrayStringConverter
All Implemented Interfaces:
StringConverter

public class ByteArrayStringConverter
extends TypeArrayStringConverter

Handle byte array textual representations.


Field Summary
protected  ByteStringConverter iByteStringConverter
          Use instance of single value converter for actual conversion work.
 
Fields inherited from class com.ricebridge.data.sc.TypeArrayStringConverter
iEscChar, iSepChar, iUseNative
 
Fields inherited from class com.ricebridge.data.sc.TypeStringConverter
iDefault
 
Constructor Summary
ByteArrayStringConverter()
          Create array converter with standard default object.
ByteArrayStringConverter(byte pDefault)
          Create array converter with specified default native value.
ByteArrayStringConverter(Byte pDefault)
          Create array converter with specified default wrapper object.
 
Method Summary
protected  String getTypeName()
          Name of Java native type.
protected  Object makeArray(List pValues)
          Create an array object from the list of values.
protected  ArrayList makeList(Object pValues)
          Convert an object into a List, if possible.
protected  Object makeTypeObjectImpl(String pValue, boolean pUseDefault)
          Type specific subclasses handle parsing.
 
Methods inherited from class com.ricebridge.data.sc.TypeArrayStringConverter
makeDefaultObjectImpl, makeDefaultStringImpl, makeObjectImpl, makeStringImpl, setDelimiters, setUseNative
 
Methods inherited from class com.ricebridge.data.sc.TypeStringConverter
makeTypeStringImpl, setDefault
 
Methods inherited from class com.ricebridge.data.sc.StringConverterSupport
makeDefaultObject, makeDefaultString, makeObject, makeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iByteStringConverter

protected ByteStringConverter iByteStringConverter
Use instance of single value converter for actual conversion work.

Constructor Detail

ByteArrayStringConverter

public ByteArrayStringConverter()
Create array converter with standard default object.


ByteArrayStringConverter

public ByteArrayStringConverter(byte pDefault)
Create array converter with specified default native value.

Parameters:
pDefault - default native value

ByteArrayStringConverter

public ByteArrayStringConverter(Byte pDefault)
Create array converter with specified default wrapper object.

Parameters:
pDefault - default wrapper value
Method Detail

getTypeName

protected String getTypeName()
Description copied from class: TypeStringConverter
Name of Java native type.

Specified by:
getTypeName in class TypeStringConverter

makeTypeObjectImpl

protected Object makeTypeObjectImpl(String pValue,
                                    boolean pUseDefault)
                             throws Exception
Description copied from class: TypeStringConverter
Type specific subclasses handle parsing.

Specified by:
makeTypeObjectImpl in class TypeStringConverter
Throws:
Exception

makeArray

protected Object makeArray(List pValues)
Description copied from class: TypeArrayStringConverter
Create an array object from the list of values.

If TypeArrayStringConverter.iUseNative is true, then create a native array, else a wrapper object array.

Specified by:
makeArray in class TypeArrayStringConverter
Parameters:
pValues - list of values

makeList

protected ArrayList makeList(Object pValues)
Description copied from class: TypeArrayStringConverter
Convert an object into a List, if possible.

If TypeArrayStringConverter.iUseNative is true, then assume pValues is a native array, else a wrapper object array.

Specified by:
makeList in class TypeArrayStringConverter
Parameters:
pValues - object that should be a list


Copyright © 2003-2006 Ricebridge