/** * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}. * * @param inputFile * The input file which should be processed. */ private final void processNormalInputFile(final File inputFile) { try { this.textFileStreamProcessor.processInputChannel(new FileInputStream(inputFile)); this.terminated = true; } catch (final Exception ex) { // NOCS NOPMD (gonna catch them all) LOGGER.error("Error reading {}", inputFile, ex); } }
/** * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}. * * @param inputFile * The input file which should be processed. */ private final void processNormalInputFile(final File inputFile) { try { this.textFileStreamProcessor.processInputChannel(new FileInputStream(inputFile)); this.terminated = true; } catch (final Exception ex) { // NOCS NOPMD (gonna catch them all) LOGGER.error("Error reading {}", inputFile, ex); } }
/** * Reads the records contained in the given normal file and passes them to the registered {@link #recordReceiver}. * * @param inputFile * The input file which should be processed. */ @Override protected void processNormalInputFile(final File inputFile) { try { InputStream fileInputStream = new FileInputStream(inputFile); if (this.shouldDecompress) { @SuppressWarnings("resource") final ZipInputStream zipInputStream = new ZipInputStream(fileInputStream); zipInputStream.getNextEntry(); fileInputStream = zipInputStream; } this.textFileStreamProcessor.processInputChannel(fileInputStream); } catch (final IOException e) { LOGGER.error("Error reading {} {}", inputFile, e); } catch (final MappingException e) { LOGGER.error("Error reading {} {}", inputFile, e); } catch (final MonitoringRecordException e) { LOGGER.error("Error reading {} {}", inputFile, e); } catch (final UnknownRecordTypeException e) { LOGGER.error("Error reading {} {}", inputFile, e); } }
fileInputStream = zipInputStream; this.textFileStreamProcessor.processInputChannel(fileInputStream); } catch (final IOException e) { LOGGER.error("Error reading {} {}", inputFile, e);
LOGGER.info("< Loading {}", filename); try { this.textFileStreamProcessor.processInputChannel(input); } catch (MappingException | MonitoringRecordException | UnknownRecordTypeException e) { LOGGER.error("Cannot deserialize text record {}", e);
LOGGER.info("< Loading {}", filename); try { this.textFileStreamProcessor.processInputChannel(input); } catch (MappingException | MonitoringRecordException | UnknownRecordTypeException e) { LOGGER.error("Cannot deserialize text record {}", e);