Examples of toObjectStream()


Examples of org.eclipse.orion.server.git.objects.Commit.toObjectStream()

    walk.setTreeFilter(AndTreeFilter.create(PathFilterGroup.createFromStrings(Collections.singleton(pattern)), TreeFilter.ANY_DIFF));
    RevCommit revCommit = walk.parseCommit(refId);
    walk.dispose();

    Commit commit = new Commit(null /* not needed */, db, revCommit, pattern);
    ObjectStream stream = commit.toObjectStream();
    if (stream == null) {
      String msg = NLS.bind("Commit body for ref {0} not found", ref);
      return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, msg, null));
    }
    IOUtilities.pipe(stream, response.getOutputStream(), true, false);
View Full Code Here

Examples of org.eclipse.orion.server.git.objects.Index.toObjectStream()

  }

  private boolean handleGet(HttpServletRequest request, HttpServletResponse response, Repository db, String pattern) throws CoreException, IOException,
      ServletException {
    Index index = new Index(null /* not needed */, db, pattern);
    ObjectStream stream = index.toObjectStream();
    if (stream == null) {
      String msg = NLS.bind("{0} not found in index", pattern); //$NON-NLS-1$
      return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.OK, HttpServletResponse.SC_NOT_FOUND, msg, null));
    }
    IOUtilities.pipe(stream, response.getOutputStream(), true, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.