UPloads content on a server.

@param content
content stream.
@return uploaded item token.
@throws RedmineException
if something goes wrong.
198420
public String upload(InputStream content) throws RedmineException {
		final URI uploadURI = getURIConfigurator().getUploadURI();
		final HttpPost request = new HttpPost(uploadURI);
		final AbstractHttpEntity entity = new InputStreamEntity(content, -1);
		/* Content type required by a Redmine */
		entity.setContentType("application/octet-stream");
		request.setEntity(entity);

		final String result = getCommunicator().sendRequest(request);
		return parseResponse(result, "upload",
            RedmineJSONParser.UPLOAD_TOKEN_PARSER);
	}
572152
public Vector addDocument(int id, String content)
    {
        Vector result = query(content);
        if (result == null) return null;
        storage.put(id, result);
        return result;
    }
175385
@Override
  public final org.jdom2.Element addContent(Content content) {
    // ignore empty elements
    if (content == null) {
      return null;
    }
    return super.addContent(content);
  }
1228221
@SuppressWarnings("unchecked")
  @NonNull public CMARichBlock addContent(@NonNull CMARichNode... content) {
    if (content == null) {
      throw new NullPointerException("content is null");
    }

    this.content.addAll(Arrays.asList(content));

    return this;
  }
338911
public static Result unauthorized(String content) {
        return status(Result.UNAUTHORIZED).render(content).as(MimeTypes.TEXT);
    }
67354
public final Post withContent(final String content) {
      return new Post(id, slug, title, excerpt, content, authorId, author,
              publishTimestamp, modifiedTimestamp, status, parentId,
              guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
   }
1117797
private Element parseContent(String content) {
		Document doc = Jsoup.parseBodyFragment(content);
		doc.outputSettings().charset(outputEncoding);
		return doc.body();
	}
44108
public static Config fromYAML(String content) throws IOException {
        ConfigSupport support = new ConfigSupport();
        return support.fromYAML(content, Config.class);
    }
1353134
public <R> R download(String uri,
			ContentHandler<BasicHttpResponse, R> handler)
			throws RedmineException {
		final HttpGet request = new HttpGet(uri);
		return errorCheckingCommunicator.sendRequest(request, handler);
	}
1325133
public function uploadString($name, $content, $contentType = 'text/plain')
    {
        $fileName = $this->path . '/' . $this->getFilePathAndUniquePrefix() . $name;

        if ($contentType === 'application/json') {
            $content = Json::prettyPrint($content);
        }

        (new Filesystem)->dumpFile($fileName, $content);

        return $fileName;
    }
285946
public static UniversalIdStrQueueMessage newInstance(String content) {
        UniversalIdStrQueueMessage msg = newInstance();
        msg.setContent(content);
        return msg;
    }
1276378
public void addContent(String path, ContentElement content) throws IOException {
    String fullPath = buildJcrPathForZip(path) + "/" + DOT_CONTENT_XML;
    Document doc = xmlContentBuilder.buildContent(content);
    writeXmlDocument(fullPath, doc);
  }
1269651
public static ByteArrayInputStream toStream(String content, String charsetName) {
		return toStream(content, CharsetUtil.charset(charsetName));
	}
817690
public static Action bytesContent(final byte[] content) {
        return new Action(response -> {

            response.setContentLength(content.length);
            try {
                response.getOutputStream().write(content);
            } catch (IOException e) {
                throw new RuntimeException("Can not write resource content for restito stubbing.");
            }
            return response;
        });
    }
799501
public FileAppendWriter write(String content) {
        try {
            writer.write(content);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return this;
    }
817144
@Override
	public <R> R sendRequest(HttpRequest request,
			ContentHandler<HttpResponse, R> handler) throws RedmineException {
		logger.debug(request.getRequestLine().toString());

		request.addHeader("Accept-Encoding", "gzip");
		final HttpClient httpclient = client;
		try {
			final HttpResponse httpResponse = httpclient
					.execute((HttpUriRequest) request);
			try {
				return handler.processContent(httpResponse);
			} finally {
				EntityUtils.consume(httpResponse.getEntity());

			}
		} catch (ClientProtocolException e1) {
			throw new RedmineFormatException(e1);
		} catch (IOException e1) {
			throw new RedmineTransportException("Cannot fetch data from "
					+ getMessageURI(request) + " : "
							+ e1.toString(), e1);
		}
	}
476191
public static Deployment of(final File content) {
        final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content).toPath());
        return new Deployment(deploymentContent, null);
    }