public BaseField readField ( ObjectInputStream daIn , BaseField fldCurrent ) throws IOException , ClassNotFoundException { String strFieldName = daIn . readUTF ( ) ; Object objData = daIn . readObject ( ) ; if ( fldCurrent == null ) if ( strFieldName . length ( ) > 0 ) { fldCurrent = ( BaseField ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( strFieldName ) ; if ( fldCurrent != null ) { fldCurrent . init ( null , null , DBConstants . DEFAULT_FIELD_LENGTH , null , null ) ; if ( this . getOwner ( ) != null ) // Make sure it is cleaned up this . getOwner ( ) . addListener ( new RemoveConverterOnCloseHandler ( fldCurrent ) ) ; } } if ( fldCurrent != null ) fldCurrent . setData ( objData ) ; return fldCurrent ; }
Decode and read this field from the stream . Will create a new field init it and set the data if the field is not passed in .