org.apache.cxf.resource.ResourceManager.getResourceAsStream()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中org.apache.cxf.resource.ResourceManager.getResourceAsStream方法的一些代码示例,展示了ResourceManager.getResourceAsStream的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.getResourceAsStream方法的具体详情如下:
包路径:org.apache.cxf.resource.ResourceManager
类名称:ResourceManager
方法名:getResourceAsStream

ResourceManager.getResourceAsStream介绍

[英]Open stream to resource.
[中]向资源开放流。

代码示例

代码示例来源:origin: org.apache.cxf/cxf-rt-core

public InputSource getInputSource(String parentLocation, String importLocation) {
  InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
  InputSource is = new InputSource(ins);
  is.setSystemId(importLocation);
  is.setPublicId(importLocation);
  URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
  if (url != null) {
    is.setSystemId(url.toString());
    is.setPublicId(url.toString());
  }
  return is;
}

代码示例来源:origin: apache/cxf

public InputSource getInputSource(String parentLocation, String importLocation) {
  InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
  InputSource is = new InputSource(ins);
  is.setSystemId(importLocation);
  is.setPublicId(importLocation);
  URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
  if (url != null) {
    is.setSystemId(url.toString());
    is.setPublicId(url.toString());
  }
  return is;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

public InputSource getInputSource(String parentLocation, String importLocation) {
  InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
  InputSource is = new InputSource(ins);
  is.setSystemId(importLocation);
  is.setPublicId(importLocation);
  URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
  if (url != null) {
    is.setSystemId(url.toString());
    is.setPublicId(url.toString());
  }
  return is;
}

代码示例来源:origin: apache/cxf

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, TLSParameterJaxBUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

代码示例来源:origin: org.apache.cxf/cxf-core

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, SSLUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

代码示例来源:origin: apache/cxf

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, SSLUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, TLSParameterJaxBUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

代码示例来源:origin: org.apache.cxf/cxf-core

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, TLSParameterJaxBUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

代码示例来源:origin: org.apache.cxf/cxf-api

private static InputStream getResourceAsStream(String resource) {
  InputStream is = ClassLoaderUtils.getResourceAsStream(resource, TLSParameterJaxBUtils.class);
  if (is == null) {
    Bus bus = BusFactory.getThreadDefaultBus(true);
    ResourceManager rm = bus.getExtension(ResourceManager.class);
    if (rm != null) {
      is = rm.getResourceAsStream(resource);
    }
  }
  return is;
}

相关文章