Equivalent to {@link #chunkedUploadAppend(String, long, byte[], int, int)
chunkedUploadAppend(uploadId, uploadOffset, data, 0, data.length)}.
197112
public long chunkedUploadAppend(String uploadId, long uploadOffset, byte[] data)
        throws DbxException
    {
        return chunkedUploadAppend(uploadId, uploadOffset, data, 0, data.length);
    }
818761
public FormattedStringBuilder append(Throwable t) { 
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        PrintStream p = new PrintStream(os);
        t.printStackTrace(p);
        p.close();
        return append(os.toString());
    }
684929
public void appendBytes(byte[] bs, int start, int len) {
        elems = ArrayUtils.ensureCapacity(elems, length + len);
        System.arraycopy(bs, start, elems, length, len);
        length += len;
    }
181268
public int append(String stringValue, boolean nullTerminated) {
        if (stringValue != null)
            append(stringValue.getBytes());
        if (nullTerminated)
            append((byte)0);
        return bytesLength;
    }
1244640
@Override
	public int append(ReadableByteChannel channel) throws IOException {
		assert invariant(true);

		int totalRead = 0;

		try {

			boolean done;

			// precondition: the channel has data

			do {
				ByteBuffer dest = writableBuf();

				int space = dest.remaining();
				assert space > 0;

				int read = channel.read(dest);
				if (read >= 0) {
					totalRead += read;
				} else {
					// end of stream (e.g. the other end closed the connection)
					removeLastBufferIfEmpty();
					sizeChanged();

					assert invariant(true);
					return -1;
				}

				// if buffer wasn't filled -> no data is available in channel
				done = read < space;
			} while (!done);

		} finally {
			removeLastBufferIfEmpty();
			sizeChanged();
			assert invariant(true);
		}

		return totalRead;
	}
481229
def append(self, data):
    """"""
    data_length = len(data)
    if self._size + data_length > self._flush_size:
      self.flush()

    if not self._exclusive and data_length > _FILE_POOL_MAX_SIZE:
      raise errors.Error(
          "Too big input %s (%s)."  % (data_length, _FILE_POOL_MAX_SIZE))
    else:
      self._buffer.append(data)
      self._size += data_length

    if self._size > self._flush_size:
      self.flush()
1057700
def file_append(filepath, newcontent, backup=false)
      content = StringIO.new
      
      if self.file_exists?(filepath)
        self.cp filepath, "#{filepath}-previous" if backup
        content = self.file_download filepath
      end
      
      if newcontent.is_a?(StringIO)
        newcontent.rewind
        content.puts newcontent.read
      else
        content.puts newcontent
      end
      
      self.file_upload content, filepath
    end
1112813
public static byte[] appendByte(byte[] bytes, byte b) {
        byte[] result = Arrays.copyOf(bytes, bytes.length + 1);
        result[result.length - 1] = b;
        return result;
    }
1317762
public void append(Encoder encoder, EncodingState encodingState, char[] b, int off, int len) throws IOException {
        if (b == null || len <= 0) {
            return;
        }
        if (shouldEncode(encoder, encodingState)) {
            EncodingState newEncoders = createNewEncodingState(encoder, encodingState);
            if (encoder instanceof StreamingEncoder) {
                ((StreamingEncoder)encoder).encodeToStream(encoder, CharSequences.createCharSequence(b, off, len), 0, len, this,
                        newEncoders);
            }
            else {
                encodeAndWrite(encoder, newEncoders, String.valueOf(b, off, len));
            }
        }
        else {
            write(encodingState, b, off, len);
        }
    }
184860
static byte[] readAllBytes(InputStream stream) throws IOException {
    int bytesRead = 0;
    byte[] currentChunk = new byte[255];
    final List<byte[]> chunks = new ArrayList<byte[]>();
    while ((bytesRead = stream.read(currentChunk)) != -1) {
      chunks.add(copyOf(currentChunk, bytesRead));
    }

    if (chunks.size() <= 0) {
      throw new IOException("Stream did not contain any data. Please provide data to upload.");
    }

    int size = 0;
    for (byte[] chunk : chunks) {
      size += chunk.length;
    }

    final byte[] content = new byte[size];
    int position = 0;
    for (byte[] chunk : chunks) {
      arraycopy(chunk, 0, content, position, chunk.length);
      position += chunk.length;
    }
    return content;
  }
1004652
public synchronized void append(XEvent event) throws IOException {
		// remember insert position
		long insertPosition = storage.length();
		// position storage pointer at end of storage
		storage.seek(insertPosition);
		// encode event to byte array
		byte evtEnc[] = encode(event);
		// compute segment length: add some slack to accomodate for later,
		// larger versions of this entry
		int segmentPaddingSize = evtEnc.length / 4;
		int segmentSize = evtEnc.length + segmentPaddingSize;
		byte segmentPadding[] = new byte[segmentPaddingSize];
		Arrays.fill(segmentPadding, (byte) 0);
		// record offset to subsequent audit trail entry for forward
		// skips; as size of event encoding + 12 bytes (for forward and
		// backward offset marker and payload size)
		storage.writeInt(segmentSize + 12);
		// record offset to previous event (for backward skips)
		storage.writeInt((int) (insertPosition - lastInsertPosition));
		// record actual payload size
		storage.writeInt(evtEnc.length);
		// record event encoding data
		storage.write(evtEnc);
		// record padding data
		storage.write(segmentPadding);
		// update last position pointer to this entry
		lastInsertPosition = insertPosition;
		// update collection size
		size++;
	}
204121
public static void append(Path self, byte[] bytes) throws IOException {
        OutputStream stream = null;
        try {
            stream = Files.newOutputStream(self, CREATE, APPEND);
            stream.write(bytes, 0, bytes.length);
            stream.flush();

            OutputStream temp = stream;
            stream = null;
            temp.close();
        } finally {
            closeWithWarning(stream);
        }
    }
459772
function hotDownloadUpdateChunk(chunkId) {
/******/ 		var head = document.getElementsByTagName("head")[0];
/******/ 		var script = document.createElement("script");
/******/ 		script.charset = "utf-8";
/******/ 		script.src = __webpack_require__.p + "static/webpack/" + chunkId + "." + hotCurrentHash + ".hot-update.js";
/******/ 		;
/******/ 		head.appendChild(script);
/******/ 	}
574684
private void appendFileDetails(final StringBuffer buf, final WMultiFileWidget fileWidget) {
		List<FileWidgetUpload> files = fileWidget.getFiles();

		if (files != null) {
			for (FileWidgetUpload file : files) {
				String streamedSize;

				try {
					InputStream in = file.getFile().getInputStream();

					int size = 0;
					while (in.read() >= 0) {
						size++;
					}

					streamedSize = String.valueOf(size);
				} catch (IOException e) {
					streamedSize = e.getMessage();
				}

				buf.append("Name: ").append(file.getFile().getName());
				buf.append("\nSize: ").append(streamedSize).append(" bytes\n\n");
			}
		}
	}
8937
@Override
    public CompletableFuture<Void> append(String streamSegmentName, byte[] data, Collection<AttributeUpdate> attributeUpdates, Duration timeout) {
        ensureRunning();

        TimeoutTimer timer = new TimeoutTimer(timeout);
        logRequest("append", streamSegmentName, data.length);
        this.metrics.append();
        return this.metadataStore.getOrAssignSegmentId(streamSegmentName, timer.getRemaining(),
                streamSegmentId -> {
                    StreamSegmentAppendOperation operation = new StreamSegmentAppendOperation(streamSegmentId, data, attributeUpdates);
                    return processAttributeUpdaterOperation(operation, timer);
                });
    }
103655
static void upload(Client client, Configuration config, File file, String key, UpToken token,
                       UpCompletionHandler completionHandler, UploadOptions options) {
        post(null, file, key, token, completionHandler, options, client, config);
    }
1119950
public <E extends Throwable> DbxEntry.File uploadFileChunked(String targetPath, DbxWriteMode writeMode, long numBytes, DbxStreamWriter<E> writer)
        throws DbxException, E
    {
        Uploader uploader = startUploadFileChunked(targetPath, writeMode, numBytes);
        return finishUploadFile(uploader, writer);
    }