Code example for File

Methods: isAbsolute

0
     */ 
    public static File newFile (final File dir, final File file)
    { 
        if (file == null) throw new IllegalArgumentException ("null input: file");
         
        if ((dir == null) || file.isAbsolute ()) return file;
         
        return new File (dir, file.getPath ());
    } 
     
    /** 
     *  
     * @param dir [null is ignored] 
     * @param file [absolute overrides 'dir'] 
     * @return 
     */ 
    public static File newFile (final File dir, final String file)
    { 
        if (file == null) throw new IllegalArgumentException ("null input: file");