private void read ( ) throws IOException { lastModified = jobFile . lastModified ( ) ; if ( jobFile . exists ( ) ) { try ( final InputStream in = new FileInputStream ( jobFile ) ) { final XMLReader parser = XMLUtils . getXMLReader ( ) ; parser . setContentHandler ( new JobHandler ( prop , files ) ) ; parser . parse ( new InputSource ( in ) ) ; } catch ( final SAXException e ) { throw new IOException ( "Failed to read job file: " + e . getMessage ( ) ) ; } } else { // defaults prop . put ( PROPERTY_GENERATE_COPY_OUTER , Generate . NOT_GENERATEOUTTER . toString ( ) ) ; prop . put ( PROPERTY_ONLY_TOPIC_IN_MAP , Boolean . toString ( false ) ) ; prop . put ( PROPERTY_OUTER_CONTROL , OutterControl . WARN . toString ( ) ) ; } }
Read temporary configuration files . If configuration files are not found assume an empty job object is being created .