protected void performProcessing() throws IOException { File resultFile = null; try { resultFile = process(); // now write the processed content to the destination if (resultFile.length() > 0) { InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile)); FileUtils.copyStream(resultStream, true, getDestination(), false); } else { setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpacking fails because intermediate file is empty: " + resultFile)); //$NON-NLS-1$ } } finally { if (resultFile != null) resultFile.delete(); } }
protected void performProcessing() throws IOException { File resultFile = null; try { resultFile = process(); // now write the processed content to the destination if (resultFile.length() > 0) { InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile)); FileUtils.copyStream(resultStream, true, getDestination(), false); } else { setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpacking fails because intermediate file is empty: " + resultFile)); //$NON-NLS-1$ } } finally { if (resultFile != null) resultFile.delete(); } }
protected void performProcessing() throws IOException { File resultFile = null; try { resultFile = process(); // now write the processed content to the destination if (resultFile.length() > 0) { InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile)); FileUtils.copyStream(resultStream, true, getDestination(), false); } else { setStatus(new Status(IStatus.ERROR, Activator.ID, "Unpacking fails because intermediate file is empty: " + resultFile)); //$NON-NLS-1$ } } finally { if (resultFile != null) resultFile.delete(); } }
@Override protected void performProcessing() throws IOException { File resultFile = null; try { resultFile = process(); // now write the processed content to the destination if (resultFile.length() > 0) { InputStream resultStream = new BufferedInputStream(new FileInputStream(resultFile)); FileUtils.copyStream(resultStream, true, getDestination(), false); } else { setStatus(new Status(IStatus.ERROR, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR, "Unpacking fails because intermediate file is empty: " + resultFile, null)); //$NON-NLS-1$ } } catch (IOException e) { setStatus(new Status(IStatus.ERROR, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR, "Unpacking fails", e)); //$NON-NLS-1$ throw e; } finally { if (resultFile != null) resultFile.delete(); } }