@Test public void testCopyFileToFinalDestinationWithoutGenerate() throws Exception { pvfsFileAliaser.copyFileToFinalDestination(); assertFalse( finalFile.exists() ); assertTempFileExistsAndDelete(); }
public void copyFileToFinalDestination() throws KettleFileException, IOException { if ( aliasingIsActive() ) { FileObject srcFile = KettleVFS.getFileObject( temporaryFilePath, variableSpace ); FileObject destFile = KettleVFS.getFileObject( finalFilePath, variableSpace ); try ( InputStream in = KettleVFS.getInputStream( srcFile ); OutputStream out = KettleVFS.getOutputStream( destFile, false ) ) { IOUtils.copy( in, out ); } } }
PvfsFileAliaser { public void copyFileToFinalDestination() throws KettleFileException, IOException { if ( aliasingIsActive() ) { FileObject srcFile = KettleVFS.getFileObject( temporaryFilePath, variableSpace ); FileObject destFile = KettleVFS.getFileObject( finalFilePath, variableSpace ); try ( InputStream in = KettleVFS.getInputStream( srcFile ); OutputStream out = KettleVFS.getOutputStream( destFile, false ) ) { IOUtils.copy( in, out ); } } } }
PvfsFileAliaser { public void copyFileToFinalDestination() throws KettleFileException, IOException { if ( aliasingIsActive() ) { FileObject srcFile = KettleVFS.getFileObject( temporaryFilePath, variableSpace ); FileObject destFile = KettleVFS.getFileObject( finalFilePath, variableSpace ); try ( InputStream in = KettleVFS.getInputStream( srcFile ); OutputStream out = KettleVFS.getOutputStream( destFile, false ) ) { IOUtils.copy( in, out ); } } } PvfsFileAliaser( String finalFilePath, VariableSpace variableSpace, IPvfsAliasGenerator aliasGenerator,
                          boolean isOverwriteOutput, LogChannelInterface log ); }
PvfsFileAliaser { public void copyFileToFinalDestination() throws KettleFileException, IOException { if ( aliasingIsActive() ) { FileObject srcFile = KettleVFS.getFileObject( temporaryFilePath, variableSpace ); FileObject destFile = KettleVFS.getFileObject( finalFilePath, variableSpace ); try ( InputStream in = KettleVFS.getInputStream( srcFile ); OutputStream out = KettleVFS.getOutputStream( destFile, false ) ) { IOUtils.copy( in, out ); } } } PvfsFileAliaser( String finalFilePath, VariableSpace variableSpace, IPvfsAliasGenerator aliasGenerator,
                          boolean isOverwriteOutput, LogChannelInterface log ); String generateAlias(); void copyFileToFinalDestination(); void deleteTempFileAndFolder(); }
PvfsFileAliaser { public void copyFileToFinalDestination() throws KettleFileException, IOException { if ( aliasingIsActive() ) { FileObject srcFile = KettleVFS.getFileObject( temporaryFilePath, variableSpace ); FileObject destFile = KettleVFS.getFileObject( finalFilePath, variableSpace ); try ( InputStream in = KettleVFS.getInputStream( srcFile ); OutputStream out = KettleVFS.getOutputStream( destFile, false ) ) { IOUtils.copy( in, out ); } } } PvfsFileAliaser( String finalFilePath, VariableSpace variableSpace, IPvfsAliasGenerator aliasGenerator,
                          boolean isOverwriteOutput, LogChannelInterface log ); String generateAlias(); void copyFileToFinalDestination(); void deleteTempFileAndFolder();  }