private FileOutputStream getOutputStreamForDestination(File destinationFile) throws FileNotFoundException { FileOutputStream outStream = null; long start = new java.util.Date().getTime(); long timeout = getRetryTimeOut(); long timeElapsed = 0; boolean FILE_NOT_FOUND = true; while (FILE_NOT_FOUND) { try{ timeElapsed = new java.util.Date().getTime() - start; outStream = createOutputStream(destinationFile); FILE_NOT_FOUND = false; }catch(FileNotFoundException fnfe) { if (timeElapsed > timeout) { //timeout throw fnfe; } } } return outStream; }
private FileOutputStream getOutputStreamForDestination(File destinationFile) throws FileNotFoundException { FileOutputStream outStream = null; long start = new java.util.Date().getTime(); long timeout = getRetryTimeOut(); long timeElapsed = 0; boolean FILE_NOT_FOUND = true; while (FILE_NOT_FOUND) { try{ timeElapsed = new java.util.Date().getTime() - start; outStream = createOutputStream(destinationFile); FILE_NOT_FOUND = false; }catch(FileNotFoundException fnfe) { if (timeElapsed > timeout) { //timeout throw fnfe; } } } return outStream; }
private FileOutputStream getOutputStreamForDestination(File destinationFile) throws FileNotFoundException { FileOutputStream outStream = null; long start = new java.util.Date().getTime(); long timeout = getRetryTimeOut(); long timeElapsed = 0; boolean FILE_NOT_FOUND = true; while (FILE_NOT_FOUND) { try{ timeElapsed = new java.util.Date().getTime() - start; outStream = createOutputStream(destinationFile); FILE_NOT_FOUND = false; }catch(FileNotFoundException fnfe) { if (timeElapsed > timeout) { //timeout throw fnfe; } } } return outStream; }