Java ClassLoader Load getAbsolutePathEssenceDesc(String file)

Here you can find the source of getAbsolutePathEssenceDesc(String file)

Description

get Absolute Path Essence Desc

License

Open Source License

Declaration

public static String getAbsolutePathEssenceDesc(String file)
            throws URISyntaxException 

Method Source Code

//package com.java2s;
/*//w w  w  .  jav a 2  s  .  c om
 * Copyright (C) 2016 Netflix, Inc.
 *
 *     This file is part of IMF Conversion Utility.
 *
 *     IMF Conversion Utility is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     IMF Conversion Utility is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with IMF Conversion Utility.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.io.File;
import java.net.URISyntaxException;

public class Main {
    public static String getAbsolutePathEssenceDesc(String file)
            throws URISyntaxException {
        return new File(getImpFolderEssenceDesc(), file).getAbsolutePath();
    }

    public static String getAbsolutePath(String file)
            throws URISyntaxException {
        return new File(getImpFolder(), file).getAbsolutePath();
    }

    public static File getImpFolderEssenceDesc() throws URISyntaxException {
        //noinspection ConstantConditions
        return new File(ClassLoader.getSystemClassLoader()
                .getResource("imp-essence-desc").toURI());
    }

    public static File getImpFolder() throws URISyntaxException {
        //noinspection ConstantConditions
        return new File(ClassLoader.getSystemClassLoader()
                .getResource("imp").toURI());
    }
}

Related

  1. get(final String key, final String filename)
  2. getAbsoluteBasePath()
  3. getAbsolutePath(String file)
  4. getAllArquillianLibs()
  5. getAsProperties(final String name)
  6. getBaseDir()
  7. getBytes(File file)