Package org.eclipse.egit.github.core

Examples of org.eclipse.egit.github.core.Blob


        } catch (IOException e) {
          debug("Exception closing stream", e);
        }
    }

    Blob blob = new Blob().setEncoding(ENCODING_BASE64);
    String encoded = EncodingUtils.toBase64(output.toByteArray());
    blob.setContent(encoded);

    try {
      if (isDebug())
        debug(MessageFormat.format("Creating blob from {0}",
            file.getAbsolutePath()));
View Full Code Here


      if (isDebug())
        debug("Creating empty .nojekyll blob at root of tree");
      if (!dryRun)
        try {
          entry.setSha(service.createBlob(repository, new Blob()
              .setEncoding(ENCODING_BASE64).setContent("")));
        } catch (IOException e) {
          throw new MojoExecutionException(
              "Error creating .nojekyll empty blob: "
                  + getExceptionMessage(e), e);
View Full Code Here

    return prefix;
  }

  private String createBlob(DataService service, RepositoryId repository, File outputDirectory, String path) throws GitHubException {
    try {
      Blob blob = new Blob().setEncoding(ENCODING_BASE64);
      if(NO_JEKYLL_FILE.equals(path)){
        blob.setContent("");
        //log.debug("Creating blob from " + NO_JEKYLL_FILE);
      }else{
        File file = new File(outputDirectory, path);
        byte[] bytes = FileUtils.readFileToByteArray(file);
        String encoded = EncodingUtils.toBase64(bytes);
        blob.setContent(encoded);
        //log.debug("Creating blob from " +  file.getAbsolutePath());
      }
      if(log.isDebugEnabled()){
        log.debug("Creating blob from " +  path);
      }
View Full Code Here

        } catch (IOException e) {
          debug("Exception closing stream", e);
        }
    }

    Blob blob = new Blob().setEncoding(ENCODING_BASE64);
    String encoded = EncodingUtils.toBase64(output.toByteArray());
    blob.setContent(encoded);

    try {
      if (isDebug())
        debug(MessageFormat.format("Creating blob from {0}",
            file.getAbsolutePath()));
View Full Code Here

      if (isDebug())
        debug("Creating empty .nojekyll blob at root of tree");
      if (!dryRun)
        try {
          entry.setSha(service.createBlob(repository, new Blob()
              .setEncoding(ENCODING_BASE64).setContent("")));
        } catch (IOException e) {
          throw new MojoExecutionException(
              "Error creating .nojekyll empty blob: "
                  + getExceptionMessage(e), e);
View Full Code Here

TOP

Related Classes of org.eclipse.egit.github.core.Blob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.