protected static void writeOptional ( final StringWriter writer, final String fieldName, final String value )
    {
        if ( value != null )
        {
            write ( writer, fieldName, value );
        }
    }
protected static void writeOptional ( final StringWriter writer, final String fieldName, final String value )
    {
        if ( value != null )
        {
            write ( writer, fieldName, value );
        }
    }
protected static void writeOptional ( final StringWriter writer , final String fieldName , final String value ) { if ( value != null ) { write ( writer , fieldName , value ) ; } }
Write field only when the value is set

@param writer
the writer to use
@param fieldName
the name of field
@param value
the value
Write field only when the value is set