protected OutputStream writeTempOutputFile(T stitchedFileMetaData) throws IOException, BlockNotFoundException {
  OutputStream outputStream=getOutputStream(tempOutFilePath);
  try {
    for (    StitchBlock outputBlock : stitchedFileMetaData.getStitchBlocksList()) {
      outputBlock.writeTo(appFS,blocksDirectoryPath,outputStream);
    }
  }
  finally {
    outputStream.close();
  }
  return outputStream;
}

protected OutputStream writeTempOutputFile ( T stitchedFileMetaData ) throws IOException , BlockNotFoundException { OutputStream outputStream = getOutputStream ( tempOutFilePath ) ; try { for ( StitchBlock outputBlock : stitchedFileMetaData . getStitchBlocksList ( ) ) { outputBlock . writeTo ( appFS , blocksDirectoryPath , outputStream ) ; } } finally { outputStream . close ( ) ; } return outputStream ; }
writing all stitch blocks to temporary file
