public abstract class FilteredResourceBase
extends javax.faces.application.ResourceWrapper
Constructor and Description |
---|
FilteredResourceBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract String |
filter(String resourceText)
This is an abstract method that allows developers to filter the contents of a resource (typically via
String.replace(char, char) etc.) before it is written to the response. |
protected int |
getBufferSize()
Returns the character buffer size used to convert the wrapped resource's
InputStream to a string. |
String |
getContentType()
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
protected String |
getEncoding()
Returns the encoding of the wrapped resource's
InputStream . |
InputStream |
getInputStream() |
String |
getLibraryName()
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
String |
getResourceName()
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
void |
setContentType(String contentType)
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
void |
setLibraryName(String libraryName)
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
void |
setResourceName(String resourceName)
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
String |
toString()
Since this method is not supplied by the
ResourceWrapper class it has to be implemented here. |
public String getContentType()
ResourceWrapper
class it has to be implemented here.getContentType
in class javax.faces.application.ResourceWrapper
public InputStream getInputStream() throws IOException
getInputStream
in class javax.faces.application.ResourceWrapper
IOException
public String getLibraryName()
ResourceWrapper
class it has to be implemented here.getLibraryName
in class javax.faces.application.ResourceWrapper
public String getResourceName()
ResourceWrapper
class it has to be implemented here.getResourceName
in class javax.faces.application.ResourceWrapper
public void setContentType(String contentType)
ResourceWrapper
class it has to be implemented here.setContentType
in class javax.faces.application.ResourceWrapper
public void setLibraryName(String libraryName)
ResourceWrapper
class it has to be implemented here.setLibraryName
in class javax.faces.application.ResourceWrapper
public void setResourceName(String resourceName)
ResourceWrapper
class it has to be implemented here.setResourceName
in class javax.faces.application.ResourceWrapper
public String toString()
ResourceWrapper
class it has to be implemented here.toString
in class javax.faces.application.Resource
protected abstract String filter(String resourceText)
String.replace(char, char)
etc.) before it is written to the response.resourceText
- The string containing the text content of the resource.protected int getBufferSize()
InputStream
to a string.
Override this method to provide a different buffer size than the default (1024).protected String getEncoding()
InputStream
. If the Content-Encoding request header is not
specified, the encoding returned from this method is used to read the InputStream. Override this method to
provide a different encoding than the default ("UTF-8").Copyright © 2018 Liferay, Inc.. All rights reserved.