Appends the given array to this buffer without copying (if possible).

@param a
429690
public void append(final byte[] a)
	{
		if(a == null) throw new NullPointerException();
		if(a.length == 0) return;
		
		if(a.length <= 8) {
			write(a, 0, a.length);		
		} else
		if((a.length <= 16) && (pos > 0) && ((buffer.length - pos) > a.length)) {
			write(a, 0, a.length);
		} else {
			flushBuffer();
			arrays.add(a);
			size += a.length;
		}
	}
774090
protected void appendCopy(RoaringArray sa, int index) {
    extendArray(1);
    this.keys[this.size] = sa.keys[index];
    this.values[this.size] = sa.values[index].clone();
    this.size++;
  }
286055
public static function appendArray( $a, $b )
    {
        if ( $a === NULL ){
            $a = array();
        }
        array_splice($a,count($a),0,$b);
        return $a;
    }
21796
public void append(char digit) {
        if (count == digits.length) {
            char[] data = new char[count + 100];
            System.arraycopy(digits, 0, data, 0, count);
            digits = data;
        }
        digits[count++] = digit;
    }
1166656
@Override
    public void addUpdate(NDArrayMessage array) {
        UnsafeBuffer directBuffer = (UnsafeBuffer) NDArrayMessage.toBuffer(array);
        byte[] data = directBuffer.byteArray();
        if (data == null) {
            data = new byte[directBuffer.capacity()];
            directBuffer.getBytes(0, data, 0, data.length);
        }
        byte[] key = ByteBuffer.allocate(4).putInt(size).array();
        try {
            db.put(key, data);
        } catch (RocksDBException e) {
            throw new RuntimeException(e);
        }

        size++;

    }
468424
def append(self, position, array):
        """"""
        if not Gauged.map_append(self.ptr, position, array.ptr):
            raise MemoryError
1264424
@SuppressWarnings("unchecked")
    @Override
    public final <AT> AT[] toArray(AT[] a) {
        this.readLock.lock();
        try {
            // Verify the array size
            if (a.length < this.size) {
                a =
                        (AT[])
                                java.lang.reflect.Array.newInstance(
                                        a.getClass().getComponentType(), this.size);
            }

            // Trick to avoid generics warning
            final Object[] result = a;

            // Copy over all elements
            int index = 0;
            for (final Queue<T> queue : this.keyedQueues.values()) {
                for (final T e : queue) {
                    result[index++] = e;
                }
            }

            // If array is too big set next element null
            if (a.length > this.size) {
                a[this.size] = null;
            }

            return a;
        } finally {
            this.readLock.unlock();
        }
    }
1121718
public static INDArray[] append(INDArray[] history, INDArray append) {
        INDArray[] appended = new INDArray[history.length];
        appended[0] = append;
        System.arraycopy(history, 0, appended, 1, history.length - 1);
        return appended;
    }
318597
public static String[] concat(String[] ...aa) {
    int l = 0;
    for (String[] a : aa) l += a.length;
    String[] r = new String[l];
    l = 0;
    for (String[] a : aa) {
      System.arraycopy(a, 0, r, l, a.length);
      l += a.length;
    }
    return r;
  }
1246636
public void append(char c[], int off, int len) throws IOException {
	append(new String(c, off, len));
    }
744591
@Nonnull
  @MayContainNull
  @Weight(Weight.Unit.NORMAL)
  public static <T> T[] append(@Nullable final T element, @MayContainNull @Nonnull final T[] array) {
    @SuppressWarnings("unchecked")
    final T[] result = (T[]) Array.newInstance(array.getClass().getComponentType(), array.length + 1);
    System.arraycopy(array, 0, result, 1, array.length);
    result[0] = element;
    return result;
  }
518212
public static int[] addToSortedIntArray(int[] a, int value) {
		
		if(a == null || a.length == 0) {
			return new int[] {value};
		}
		
		int insertionPoint = -java.util.Arrays.binarySearch(a, value) - 1;
		if(insertionPoint < 0) {
			throw new IllegalArgumentException(String.format("Element %d already exists in array", value));
		}
		
		int[] array = new int[a.length + 1];
		if(insertionPoint > 0) {
			System.arraycopy(a, 0, array, 0, insertionPoint);
		}
		array[insertionPoint] = value;
		if(insertionPoint < a.length) {
			System.arraycopy(a, insertionPoint, array, insertionPoint + 1, array.length - insertionPoint - 1);
		}
		
		return array;
	}
43796
public void write(char[] ca,int offset, int length)
        throws IOException
    {
        _buffer.append(ca,offset,length);
    }
1343354
function appendData(data, builder) {
  if(Array.isArray(data) || Buffer.isBuffer(data)) {
    data = Buffer.from(data);
  } else {
    data = Buffer.from(data, 'ascii');
  }

  builder.appendBuffer(data);
}
368007
@SafeVarargs
	public static <T> T[] addAll(T[]... arrays) {
		if (arrays.length == 1) {
			return arrays[0];
		}

		int length = 0;
		for (T[] array : arrays) {
			if (array == null) {
				continue;
			}
			length += array.length;
		}
		T[] result = newArray(arrays.getClass().getComponentType().getComponentType(), length);

		length = 0;
		for (T[] array : arrays) {
			if (array == null) {
				continue;
			}
			System.arraycopy(array, 0, result, length, array.length);
			length += array.length;
		}
		return result;
	}
232035
protected void append(RoaringArray sa, int startingIndex, int end) {
    extendArray(end - startingIndex);
    for (int i = startingIndex; i < end; ++i) {
      this.keys[this.size] = sa.keys[i];
      this.values[this.size] = sa.values[i];
      this.size++;
    }
  }
910399
protected void putBatch(Object[] objectArray) {

        int index = 0;
        synchronized (this) {
            while (index < objectArray.length && objectArray[index] != null) {
                put(objectArray[index]);
                index++;
            }
        }
        return;
    }