Examples of SafeBufferedOutputStream


Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      InputStream rpIn = receivePack.getInputStream();
      OutputStream rpOut = receivePack.getOutputStream();

      rpIn = new BufferedInputStream(rpIn);
      rpOut = new SafeBufferedOutputStream(rpOut);

      init(rpIn, rpOut);
      readAdvertisedRefs();
    }
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

   */
  public void write() throws IOException {
    final LockFile tmp = myLock;
    requireLocked(tmp);
    try {
      writeTo(new SafeBufferedOutputStream(tmp.getOutputStream()));
    } catch (IOException err) {
      tmp.unlock();
      throw err;
    } catch (RuntimeException err) {
      tmp.unlock();
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

   */
  public void write() throws IOException {
    final LockFile tmp = myLock;
    requireLocked(tmp);
    try {
      writeTo(new SafeBufferedOutputStream(tmp.getOutputStream()));
    } catch (IOException err) {
      tmp.unlock();
      throw err;
    } catch (RuntimeException err) {
      tmp.unlock();
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

   */
  private void writeHeadsFile(List<ObjectId> heads, String filename)
      throws FileNotFoundException, IOException {
    File headsFile = new File(getDirectory(), filename);
    if (heads != null) {
      BufferedOutputStream bos = new SafeBufferedOutputStream(
          new FileOutputStream(headsFile));
      try {
        for (ObjectId id : heads) {
          id.copyTo(bos);
          bos.write('\n');
        }
      } finally {
        bos.close();
      }
    } else {
      FileUtils.delete(headsFile, FileUtils.SKIP_MISSING);
    }
  }
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      // other direction (index, then pack file).
      //
      final String wt = "Put " + base.substring(0, 12); //$NON-NLS-1$
      OutputStream os = dest.writeFile(pathPack, monitor, wt + "..pack"); //$NON-NLS-1$
      try {
        os = new SafeBufferedOutputStream(os);
        writer.writePack(monitor, monitor, os);
      } finally {
        os.close();
      }

      os = dest.writeFile(pathIdx, monitor, wt + "..idx"); //$NON-NLS-1$
      try {
        os = new SafeBufferedOutputStream(os);
        writer.writeIndex(os);
      } finally {
        os.close();
      }
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      InputStream upIn = uploadPack.getInputStream();
      OutputStream upOut = uploadPack.getOutputStream();

      upIn = new BufferedInputStream(upIn);
      upOut = new SafeBufferedOutputStream(upOut);

      init(upIn, upOut);
      readAdvertisedRefs();
    }
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      InputStream rpIn = receivePack.getInputStream();
      OutputStream rpOut = receivePack.getOutputStream();

      rpIn = new BufferedInputStream(rpIn);
      rpOut = new SafeBufferedOutputStream(rpOut);

      init(rpIn, rpOut);
      readAdvertisedRefs();
    }
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      try {
        InputStream sIn = sock.getInputStream();
        OutputStream sOut = sock.getOutputStream();

        sIn = new BufferedInputStream(sIn);
        sOut = new SafeBufferedOutputStream(sOut);

        init(sIn, sOut);
        service("git-upload-pack", pckOut); //$NON-NLS-1$
      } catch (IOException err) {
        close();
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

      try {
        InputStream sIn = sock.getInputStream();
        OutputStream sOut = sock.getOutputStream();

        sIn = new BufferedInputStream(sIn);
        sOut = new SafeBufferedOutputStream(sOut);

        init(sIn, sOut);
        service("git-receive-pack", pckOut); //$NON-NLS-1$
      } catch (IOException err) {
        close();
View Full Code Here

Examples of org.eclipse.jgit.util.io.SafeBufferedOutputStream

   */
  public void write() throws IOException {
    final LockFile tmp = myLock;
    requireLocked(tmp);
    try {
      writeTo(new SafeBufferedOutputStream(tmp.getOutputStream()));
    } catch (IOException err) {
      tmp.unlock();
      throw err;
    } catch (RuntimeException err) {
      tmp.unlock();
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.