@Override
    protected void write(final Object value) throws IOException {
        String stringValue = "";

        if (value != null) {
            // TODO DO: format the value
            if (value instanceof BigDecimal) {
                final BigDecimal bd = (BigDecimal) value;
                stringValue = bd.signum() == 0 ? "0" : bd.toPlainString();
            } else {
                stringValue = value.toString();
            }
        }

        final boolean needsQuoting = stringValue.indexOf(delimiter) != -1 //
                || qualifier != FPConstants.NO_QUALIFIER && stringValue.indexOf(qualifier) != -1 //
                || stringValue.indexOf('\n') != -1;
        // || stringValue.split("\r\n|\r|\n").length > 1;

        if (needsQuoting) {
            super.write(qualifier);
        }

        super.write(stringValue);

        if (needsQuoting) {
            super.write(qualifier);
        }
    }