Package org.eclipse.jgit.util.io

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


   * @param dst
   *            the output stream to which the index will be written.
   */
  public PackBitmapIndexWriterV1(final OutputStream dst) {
    out = new DigestOutputStream(dst instanceof BufferedOutputStream ? dst
        : new SafeBufferedOutputStream(dst),
        Constants.newMessageDigest());
    dataOutput = new SimpleDataOutput(out);
  }
View Full Code Here

    }

    void execute( final Socket sock ) throws IOException,
            ServiceNotEnabledException, ServiceNotAuthorizedException {
        rawIn = new BufferedInputStream( sock.getInputStream() );
        rawOut = new SafeBufferedOutputStream( sock.getOutputStream() );

        if ( 0 < daemon.getTimeout() ) {
            sock.setSoTimeout( daemon.getTimeout() * 1000 );
        }
        String cmd = new PacketLineIn( rawIn ).readStringRaw();
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.util.io.SafeBufferedOutputStream

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.