<p>Append the field start to the buffer.</p>

@param buffer  the <code>StringBuffer</code> to populate
@param fieldName  the field name
331504
@Override
    protected void appendFieldStart( final StringBuffer    buffer,
                                     final String          fieldName )
    {
        appendFieldSeparator( buffer );

        if ( isUseFieldNames() && fieldName != null )
        {
            buffer.append( fieldName );

            for ( int ii = 0; ii < ( 18 - fieldName.length()); ii++ )
            {
                buffer.append( " " );
            }

            buffer.append( getFieldNameValueSeparator() );
        }
    }
949478
private void appendValue(StringBuilder builder, Class fieldClazz, Object value)
    {

        if (fieldClazz != null
                && value != null
                && (fieldClazz.isAssignableFrom(String.class) || fieldClazz.isAssignableFrom(char.class)
                        || fieldClazz.isAssignableFrom(Character.class) || value instanceof Enum))
        {

            if (fieldClazz.isAssignableFrom(String.class))
            {
                // To allow escape character
                value = ((String) value).replaceAll("'", "''");
            }
            builder.append("'");

            if (value instanceof Enum)
            {
                builder.append(((Enum) value).name());
            }

            else
            {
                builder.append(value);
            }
            builder.append("'");
        }
        else
        {
            builder.append(value);
        }

    }
669959
private void appendParameter(Object value, StringBuffer buf)
    {
        if (value instanceof Query)
        {
            appendSubQuery((Query) value, buf);
        }
        else
        {
            buf.append("?");
        }
    }
911722
public void addField(final String name, final Object value) {
        if (value == null) {
            this.fields.add(new Field(name, null, null));
        } else {
            this.fields.add(new Field(name, value.toString(), value.getClass().getName()));
        }
    }
330216
public void append(final char[] data) {
        if (data == null) {
            return;
        }
        provideCapacity(length + data.length);
        System.arraycopy(data, 0, c, length, data.length);
        length += data.length;
    }
277820
public void prepend(StringBuilder buffer, Object value) {
        if (buffer == null) {
            throw new NullPointerException("buffer");
        }

        buffer.insert(0, value);
    }
319989
public void writeField(String field) throws IOException {

		if (this.newLine) {
			this.newLine = false;
		} else {
			this.write(',');
		}

		// case 0: empty string, simple :)
		if ((field == null) || (field.length() == 0)) {
			return;
		}

		// case 1: field has quotes in it, if so convert to, quote field and
		// double all quotes
		Matcher matcher = escapePattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.tmpBuffer.setLength(0);
			do {
				matcher.appendReplacement(this.tmpBuffer, "\"\"");
			} while (matcher.find());
			matcher.appendTail(this.tmpBuffer);
			this.write(this.tmpBuffer.toString());
			this.write('"');
			return;
		}

		// case 2: field has a comma, carriage return or new line in it, if so
		// quote field and double all quotes
		matcher = specialCharsPattern.matcher(field);
		if (matcher.find()) {
			this.write('"');
			this.write(field);
			this.write('"');
			return;
		}

		// case 3: safe string to just add
		this.append(field);
	}
913140
public static void appendResponse(StringBuilder buffer, String response) {
        if (response != null && !response.isEmpty()) {
            if (buffer.length() > 0) {
                buffer.append("\r\n");
            }

            buffer.append(response);
        }
    }
575624
@Override
  public StringBuilder appendToBuffer(StringBuilder buf) {
    buf.append(getTask());
    buf.append(": ");
    buf.append(getProcessed());
    return buf;
  }
1215723
private void dataBufferAppend(char[] ch, int start, int length) {
        dataBuffer = (char[]) extendArray(dataBuffer, dataBuffer.length,
                dataBufferPos + length);

        System.arraycopy(ch, start, dataBuffer, dataBufferPos, length);
        dataBufferPos += length;
    }
779866
public static StringBuffer appendOpeningTag(StringBuffer buffer, String tag)
	{
		return appendOpeningTag(buffer, tag, EMPTY_MAP);
	}
691057
public void appendToBuffer(StringBuilder buf) {
    Iterator<Polygon> iter = polygons.iterator();
    while(iter.hasNext()) {
      Polygon poly = iter.next();
      poly.appendToBuffer(buf);
      if(iter.hasNext()) {
        buf.append(" -- ");
      }
    }
  }
72438
public static void addFieldValue(List<FieldMeta> fieldValues,String fieldName,Object value){
		FieldMeta fieldMeta = new FieldMeta();
		fieldMeta.setEsFieldName(fieldName);
		fieldMeta.setValue(value);
		fieldValues.add(fieldMeta);
	}
415092
public synchronized void add(FieldTable table) throws DBException
    {
        if (m_VKeyList == null)
            this.initKeyAreas(table);

        BaseBuffer bufferNew = (BaseBuffer)table.getDataSource(); // same as .getHandle(Constants.DATA_SOURCE_HANDLE);
        if (table.getRecord().getEditMode() == Constants.EDIT_ADD)
        {
            for (int iKeyArea = Constants.MAIN_KEY_AREA; iKeyArea < table.getRecord().getKeyAreaCount() + Constants.MAIN_KEY_AREA; iKeyArea++)
            {
                try   {
                    if (iKeyArea == Constants.MAIN_KEY_AREA)
                    {   // Special logic to set auto-counter field
                        FieldInfo field = table.getRecord().getCounterField();
                        if (field != null)
                            if (!field.isNull())
                                if (!table.getRecord().isAutoSequence())
                        {   // Autosequence disabled
                            int iValue = (int)field.getValue();
                            if (iValue >= m_iCounter)
                                m_iCounter = iValue + 1;    // New next counter value
                            field = null;   // Special case - autosequence is disabled, so write the field as is.
                        }
                        if (field != null)
                        {
                            field.setValue(m_iCounter++, Constants.DONT_DISPLAY, Constants.READ_MOVE);  // ReadMove keeps this method from being called again
                            table.fieldsToData(table.getRecord()); // Update buffer
                            bufferNew = (BaseBuffer)table.getDataSource();  // same as .getHandle(Constants.DATA_SOURCE_HANDLE);
                        }
                    }
                    bufferNew.bufferToFields(table.getRecord(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
                    this.getPKeyArea(iKeyArea).doWrite(table, table.getRecord().getKeyArea(iKeyArea), bufferNew);
                } catch (DBException ex)    {
                    if (ex.getErrorCode() == Constants.DUPLICATE_KEY)
                    {
                        iKeyArea--;     // Duplicate key, delete all keys added so far!!!
                        while (iKeyArea >= Constants.MAIN_KEY_AREA)
                        {
                            bufferNew.bufferToFields(table.getRecord(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
                            this.getPKeyArea(iKeyArea).doRemove(table, table.getRecord().getKeyArea(iKeyArea), bufferNew);
                            iKeyArea--;
                        }
                    }
                    throw ex;
                }
            }
            // Restore the record before returing (key.doWrite probably changed it).
            bufferNew.bufferToFields(table.getRecord(), Constants.DONT_DISPLAY, Constants.READ_MOVE);
        }
        else
            throw new DBException(Constants.INVALID_RECORD);
    }
222931
public void setBuffer(final String buffer) {
        this.buffer = Arrays.copyOf(buffer.getBytes(), Math.max(buffer.length() + 1, MIN_BUFFER_LEN));
        this.bufferLength = this.buffer.length;
    }
1250312
public StringBuffer append(File source, StringBuffer buffer) throws IOException
	{
		return append(new FileInputStream(source), buffer);
	}
1149374
public void declareRequestedFieldname(String name) {
        if (name.endsWith(".*")) {
            stringSetValues.put(name, new HashMap<>());
            stringSetPrefixes.put(name.substring(0, name.length() - 1), name);
        }
    }