class FileByFileV1DeltaApplier implements DeltaApplier {

  @Override
  public void applyDelta(File oldBlob, InputStream deltaIn, OutputStream newBlobOut)
      throws IOException {
    if (!tempDir.exists()) {
      // Be nice, try to create the temp directory. Don't bother to check return value as the code
      // will fail when it tries to create the file in a few more lines anyways.
      tempDir.mkdirs();
    }
    File tempFile = File.createTempFile("gfbfv1", "old", tempDir);
    try {
      applyDeltaInternal(oldBlob, tempFile, deltaIn, newBlobOut);
    } finally {
      tempFile.delete();
    }
  }

  public  FileByFileV1DeltaApplier();
  public  FileByFileV1DeltaApplier(File tempDir);

}