private InputStream createAutoDetectedStream(final String defaultFileName) throws IOException {
  try {
    Validate.notNull(wroFile,"Cannot call this method if wroFile is null!");
    if (autoDetectWroFile) {
      final File file=new File(wroFile.getParentFile(),defaultFileName);
      LOG.debug("\tloading autodetected wro file: " + file);
      return new FileInputStream(file);
    }
    LOG.debug("loading wroFile: " + wroFile);
    return new FileInputStream(wroFile);
  }
 catch (  final FileNotFoundException e) {
    if (autoDetectWroFile) {
      throw e;
    }
    throw new WroRuntimeException("The wroFile doesn't exist. Skip trying with other wro model factories",e);
  }
}

private InputStream createAutoDetectedStream ( final String defaultFileName ) throws IOException { try { Validate . notNull ( wroFile , "Cannot call this method if wroFile is null!" ) ; if ( autoDetectWroFile ) { final File file = new File ( wroFile . getParentFile ( ) , defaultFileName ) ; LOG . debug ( "\tloading autodetected wro file: " + file ) ; return new FileInputStream ( file ) ; } LOG . debug ( "loading wroFile: " + wroFile ) ; return new FileInputStream ( wroFile ) ; } catch ( final FileNotFoundException e ) { if ( autoDetectWroFile ) { throw e ; } throw new WroRuntimeException ( "The wroFile doesn't exist. Skip trying with other wro model factories" , e ) ; } }
handles the resource model auto detection .
