public VerifiedDownload(Logger log,ArtifactContext context,FileContentStore fileContentStore,Node node){
  this.log=log;
  this.context=context;
  parent=NodeUtils.firstParent(node);
  if (parent == null) {
    throw new IllegalArgumentException("Parent should not be null: " + node);
  }
  this.node=node;
  this.fileContentStore=fileContentStore;
  File f;
  File parentDir=fileContentStore.getFile(parent);
  parentDir.mkdirs();
  try {
    f=File.createTempFile(node.getLabel() + ".",".tmp",parentDir);
  }
 catch (  IOException e) {
    e.printStackTrace();
    log.debug("IOException while creating temp file: " + e);
    f=new File(parentDir,node.getLabel() + AbstractNodeRepositoryManager.VALIDATING);
    FileUtil.delete(f);
  }
  f.deleteOnExit();
  tempNode=parent.getChild(f.getName());
  tempFile=fileContentStore.getFile(tempNode);
}

public VerifiedDownload ( Logger log , ArtifactContext context , FileContentStore fileContentStore , Node node ) { this . log = log ; this . context = context ; parent = NodeUtils . firstParent ( node ) ; if ( parent == null ) { throw new IllegalArgumentException ( "Parent should not be null: " + node ) ; } this . node = node ; this . fileContentStore = fileContentStore ; File f ; File parentDir = fileContentStore . getFile ( parent ) ; parentDir . mkdirs ( ) ; try { f = File . createTempFile ( node . getLabel ( ) + "." , ".tmp" , parentDir ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; log . debug ( "IOException while creating temp file: " + e ) ; f = new File ( parentDir , node . getLabel ( ) + AbstractNodeRepositoryManager . VALIDATING ) ; FileUtil . delete ( f ) ; } f . deleteOnExit ( ) ; tempNode = parent . getChild ( f . getName ( ) ) ; tempFile = fileContentStore . getFile ( tempNode ) ; }
prepare for the download
