public static void createCol(StringBuffer strOut, Object obj) {
        if (obj != null) {
            strOut.append(QUOTE);
            String content;

            if (obj instanceof Boolean) {
                content = obj.toString();
            } else if (obj instanceof Calendar) {
                content = obj.toString();
            } else if (obj instanceof Timestamp) {
                content = DP_YYYY_MM_DD_HH_MM.format(new Date(((Timestamp) obj).getTime()));
            } else if (obj instanceof Date) {
                content = DP_YYYY_MM_DD_HH_MM.format((Date) obj);
            } else {
                content = write(String.valueOf(obj));
            }
            strOut.append(content);
            strOut.append(QUOTE);
        } else {
            strOut.append("\" \" ");
        }
    }
public static void createCol(StringBuffer strOut, Object obj) {
        if (obj != null) {
            strOut.append(QUOTE);
            String content;

            if (obj instanceof Boolean) {
                content = obj.toString();
            } else if (obj instanceof Calendar) {
                content = obj.toString();
            } else if (obj instanceof Timestamp) {
                content = DP_YYYY_MM_DD_HH_MM.format(new Date(((Timestamp) obj).getTime()));
            } else if (obj instanceof Date) {
                content = DP_YYYY_MM_DD_HH_MM.format((Date) obj);
            } else {
                content = write(String.valueOf(obj));
            }
            strOut.append(content);
            strOut.append(QUOTE);
        } else {
            strOut.append("\" \" ");
        }
    }
public static void createCol ( StringBuffer strOut , Object obj ) { if ( obj != null ) { strOut . append ( QUOTE ) ; String content ; if ( obj instanceof Boolean ) { content = obj . toString ( ) ; } else if ( obj instanceof Calendar ) { content = obj . toString ( ) ; } else if ( obj instanceof Timestamp ) { content = DP_YYYY_MM_DD_HH_MM . format ( new Date ( ( ( Timestamp ) obj ) . getTime ( ) ) ) ; } else if ( obj instanceof Date ) { content = DP_YYYY_MM_DD_HH_MM . format ( ( Date ) obj ) ; } else { content = write ( String . valueOf ( obj ) ) ; } strOut . append ( content ) ; strOut . append ( QUOTE ) ; } else { strOut . append ( "\" \" " ) ; } }
把单个元素转化
把单个元素转化