Examples of SafeBufferedOutputStream


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
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.