protected InputStream initInput ( final File file ) throws MojoExecutionException { InputStream stream = null ; try { if ( file . isDirectory ( ) ) { throw new MojoExecutionException ( "File " + file . getAbsolutePath ( ) + " is directory!" ) ; } if ( ! file . exists ( ) ) { throw new MojoExecutionException ( "File " + file . getAbsolutePath ( ) + " does not exist!" ) ; } stream = new FileInputStream ( file ) ; //append to outfile here } catch ( FileNotFoundException e ) { throw new MojoExecutionException ( "Could not find file: " + file . getAbsolutePath ( ) , e ) ; } return stream ; }
Opens an InputStream based on the supplied file