本文整理了Java中javax.faces.application.Resource.getInputStream
方法的一些代码示例,展示了Resource.getInputStream
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Resource.getInputStream
方法的具体详情如下:
包路径:javax.faces.application.Resource
类名称:Resource
方法名:getInputStream
[英]If the current request is a resource request, (that is, ResourceHandler#isResourceRequestreturns true
), return an InputStream
containing the bytes of the resource. Otherwise, throw an IOException
.
[中]如果当前请求是资源请求(即ResourceHandler#isResourceRequestreturnstrue
),则返回一个包含资源字节的InputStream
。否则,抛出一个IOException
。
代码示例来源:origin: primefaces/primefaces
inputStream = resource.getInputStream();
contentType = resource.getContentType();
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
@Override
public InputStream openStream() throws IOException {
return resource.getInputStream();
}
}
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
@Override
public InputStream getInputStream() throws IOException {
return resource.getInputStream();
}
代码示例来源:origin: com.sun.faces/jsf-api
/**
* <p class="changed_added_2_0">The default behavior of this method
* is to call {@link Resource#getInputStream} on the wrapped {@link
* ResourceHandler} object.</p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: javax/javaee-web-api
/**
* <p class="changed_added_2_0">The default behavior of this method
* is to call {@link Resource#getInputStream} on the wrapped {@link
* ResourceHandler} object.</p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-api
@Override
public InputStream getInputStream() throws IOException
{
return getWrapped().getInputStream();
}
代码示例来源:origin: javax.faces/javax.faces-api
/**
* <p class="changed_added_2_0">The default behavior of this method
* is to call {@link Resource#getInputStream} on the wrapped {@link
* ResourceHandler} object.</p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.glassfish/javax.faces
/**
* <p class="changed_added_2_0">
* The default behavior of this method is to call {@link Resource#getInputStream} on the wrapped
* {@link ResourceHandler} object.
* </p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec
/**
* <p class="changed_added_2_0">The default behavior of this method
* is to call {@link Resource#getInputStream} on the wrapped {@link
* ResourceHandler} object.</p>
*/
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.glassfish/jakarta.faces
/**
* <p class="changed_added_2_0">
* The default behavior of this method is to call {@link Resource#getInputStream} on the wrapped
* {@link ResourceHandler} object.
* </p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: eclipse-ee4j/mojarra
/**
* <p class="changed_added_2_0">
* The default behavior of this method is to call {@link Resource#getInputStream} on the wrapped
* {@link ResourceHandler} object.
* </p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.apache.myfaces.core/myfaces-impl
public InputStream getInputStream() throws IOException
{
return getWrapped().getInputStream();
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* <p class="changed_added_2_0">The default behavior of this method
* is to call {@link Resource#getInputStream} on the wrapped {@link
* ResourceHandler} object.</p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: eclipse-ee4j/mojarra
/**
* <p class="changed_added_2_0">
* The default behavior of this method is to call {@link Resource#getInputStream} on the wrapped
* {@link ResourceHandler} object.
* </p>
*/
@Override
public InputStream getInputStream() throws IOException {
return getWrapped().getInputStream();
}
代码示例来源:origin: org.icefaces/icefaces
public InputStream getInputStream() throws IOException {
ArrayList<InputStream> streams = new ArrayList();
for (Info next : resourceInfos.resources) {
ResourceHandler handler = FacesContext.getCurrentInstance().getApplication().getResourceHandler();
Resource resource = handler.createResource(next.name, next.library);
streams.add(new SkipBOMInputStream(resource.getInputStream()));
streams.add(new ByteArrayInputStream("\n\r".getBytes("UTF-8")));
}
return new SequenceInputStream(Collections.enumeration(streams));
}
代码示例来源:origin: org.omnifaces/omnifaces
@Override
public InputStream getInputStream() throws IOException {
Resource wrapped = getWrapped();
return (wrapped != null) ? wrapped.getInputStream() : getURL().openStream();
}
代码示例来源:origin: omnifaces/omnifaces
@Override
public InputStream getInputStream() throws IOException {
Resource wrapped = getWrapped();
return (wrapped != null) ? wrapped.getInputStream() : getURL().openStream();
}
代码示例来源:origin: org.omnifaces/omnifaces
private Resource createGraphicResourceByName(FacesContext context, String name, boolean dataURI) throws IOException {
String library = (String) getAttributes().get("library");
Resource resource = context.getApplication().getResourceHandler().createResource(name, library);
if (resource != null && dataURI && resource.getContentType().startsWith("image")) {
resource = new GraphicResource(resource.getInputStream(), resource.getContentType());
}
return resource;
}
代码示例来源:origin: omnifaces/omnifaces
private Resource createGraphicResourceByName(FacesContext context, String name, boolean dataURI) throws IOException {
String library = (String) getAttributes().get("library");
Resource resource = context.getApplication().getResourceHandler().createResource(name, library);
if (resource != null && dataURI && resource.getContentType().startsWith("image")) {
resource = new GraphicResource(resource.getInputStream(), resource.getContentType());
}
return resource;
}
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
public void initialize(Resource resource) throws IOException {
setResourceName(resource.getResourceName());
setContentType(resource.getContentType());
this.headers = resource.getResponseHeaders();
initializeFromHeaders();
this.content = readContent(resource.getInputStream());
}
内容来源于网络,如有侵权,请联系作者删除!