Package org.eclipse.jgit.transport

Examples of org.eclipse.jgit.transport.PacketLineOut.end()


      HttpServletResponse res, String textForGit) throws IOException {
    ByteArrayOutputStream buf = new ByteArrayOutputStream(128);
    PacketLineOut pck = new PacketLineOut(buf);
    String svc = req.getParameter("service");
    pck.writeString("# service=" + svc + "\n");
    pck.end();
    pck.writeString("ERR " + textForGit);
    send(req, res, infoRefsResultType(svc), buf.toByteArray());
  }

  private static void sendUploadPackError(HttpServletRequest req,
View Full Code Here


    try {
      res.setContentType(infoRefsResultType(svc));

      final PacketLineOut out = new PacketLineOut(buf);
      out.writeString("# service=" + svc + "\n");
      out.end();
      advertise(req, new PacketLineOutRefAdvertiser(out));
      buf.close();
    } catch (ServiceNotAuthorizedException e) {
      res.sendError(SC_UNAUTHORIZED);
View Full Code Here

      HttpServletResponse res, String textForGit) throws IOException {
    ByteArrayOutputStream buf = new ByteArrayOutputStream(128);
    PacketLineOut pck = new PacketLineOut(buf);
    String svc = req.getParameter("service");
    pck.writeString("# service=" + svc + "\n");
    pck.end();
    pck.writeString("ERR " + textForGit);
    send(req, res, infoRefsResultType(svc), buf.toByteArray());
  }

  private static void sendUploadPackError(HttpServletRequest req,
View Full Code Here

    sb.append("report-status");

    ByteArrayOutputStream reqbuf = new ByteArrayOutputStream();
    PacketLineOut reqpck = new PacketLineOut(reqbuf);
    reqpck.writeString(sb.toString());
    reqpck.end();

    packHeader(reqbuf, 1);

    byte[] reqbin = reqbuf.toByteArray();
View Full Code Here

        rsp.setContentType("application/x-" + svc + "-advertisement");

        final SmartOutputStream buf = new SmartOutputStream(req, rsp);
        final PacketLineOut out = new PacketLineOut(buf);
        out.writeString("# service=" + svc + "\n");
        out.end();
        advertise(req, db, new PacketLineOutRefAdvertiser(out));
        buf.close();
      } catch (ServiceNotAuthorizedException e) {
        rsp.sendError(SC_UNAUTHORIZED);
View Full Code Here

        response.setContentType("application/x-" + service + "-advertisement");

        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        PacketLineOut packetLineOut = new PacketLineOut(byteArrayOutputStream);
        packetLineOut.writeString("# service=" + service + "\n");
        packetLineOut.end();
        PacketLineOutRefAdvertiser packetLineOutRefAdvertiser = new PacketLineOutRefAdvertiser(packetLineOut);

        if (service.equals("git-upload-pack")) {
            Repository repository = GitRepository.buildGitRepository(project);
            UploadPack uploadPack = new UploadPack(repository);
View Full Code Here

      HttpServletResponse res, String textForGit) throws IOException {
    ByteArrayOutputStream buf = new ByteArrayOutputStream(128);
    PacketLineOut pck = new PacketLineOut(buf);
    String svc = req.getParameter("service");
    pck.writeString("# service=" + svc + "\n");
    pck.end();
    pck.writeString("ERR " + textForGit);
    send(req, res, infoRefsResultType(svc), buf.toByteArray());
  }

  private static void sendUploadPackError(HttpServletRequest req,
View Full Code Here

    try {
      res.setContentType(infoRefsResultType(svc));

      final PacketLineOut out = new PacketLineOut(buf);
      out.writeString("# service=" + svc + "\n");
      out.end();
      advertise(req, new PacketLineOutRefAdvertiser(out));
      buf.close();
    } catch (ServiceNotAuthorizedException e) {
      res.sendError(SC_UNAUTHORIZED);
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.