All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alipay.rdf.file.resource.ClasspathRdfResource Maven / Gradle / Ivy

There is a newer version: 2.2.11
Show newest version
package com.alipay.rdf.file.resource;

import java.io.InputStream;

import com.alipay.rdf.file.util.RdfFileUtil;

/**
 * Copyright (C) 2013-2018 Ant Financial Services Group
 *
 * @author hongwei.quhw
 * @version $Id: ClasspathRdfResource.java, v 0.1 2018年3月12日 下午4:24:04 hongwei.quhw Exp $
 */
public class ClasspathRdfResource extends AbstractRdfResources {

    @Override
    public RdfInputStream getInputStream(String path) {
        InputStream is = RdfFileUtil.getDefaultClassLoader().getResourceAsStream(path);

        if (null == is) {
            is = RdfFileUtil.class.getResourceAsStream(path);
        }

        if (null == is) {
            return null;
        }

        return new RdfInputStream(is);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy