Code example for File

Methods: getAbsolutePathisFile

0
    public PersistedToolchains build( File userToolchainsFile )
        throws MisconfiguredToolchainException 
    { 
        PersistedToolchains toolchains = null;
 
        if ( userToolchainsFile != null && userToolchainsFile.isFile() )
        { 
            Reader in = null;
            try 
            { 
                in = ReaderFactory.newXmlReader( userToolchainsFile );
                toolchains = new MavenToolchainsXpp3Reader().read( in );
            } 
            catch ( Exception e )
            { 
                throw new MisconfiguredToolchainException( "Cannot read toolchains file at " 
                    + userToolchainsFile.getAbsolutePath(), e );
            } 
            finally 
            { 
                IOUtil.close( in );
            }