|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.Resource
org.wings.StaticResource
org.wings.resource.ClassPathResource
org.wings.resource.ClassPathStylesheetResource
public class ClassPathStylesheetResource
A ClassPathStylesheetResource is a static resource whose content is read from a classloader. It is special for its handling of occurences of "url([classPath])" strings. These are read from classPath and externalized.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.wings.StaticResource |
|---|
StaticResource.LimitedBuffer |
| Nested classes/interfaces inherited from class org.wings.Resource |
|---|
Resource.HeaderEntry |
| Field Summary |
|---|
| Fields inherited from class org.wings.resource.ClassPathResource |
|---|
resourceFileName |
| Fields inherited from class org.wings.StaticResource |
|---|
buffer, externalizerFlags, maxBufferSize, size |
| Fields inherited from class org.wings.Resource |
|---|
extension, headers, id, mimeType |
| Constructor Summary | |
|---|---|
ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName)
A static css resource that is obtained from the specified class loader |
|
ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName,
String mimeType)
A static css resource that is obtained from the specified class loader |
|
ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName,
String mimeType,
int maxBufferSize)
A static css resource that is obtained from the specified class loader |
|
ClassPathStylesheetResource(String resourceFileName)
A static css resource that is obtained from the default classpath. |
|
ClassPathStylesheetResource(String resourceFileName,
String mimeType)
A static css resource that is obtained from the default classpath. |
|
| Method Summary | |
|---|---|
protected StaticResource.LimitedBuffer |
bufferResource()
Reads the resource into an LimitedBuffer and returns it. |
boolean |
equals(Object o)
Two ClassPathStylesheetResource are equal if both of them are instances of ClassPathStylesheetResource and the equals method of ClassPathResource is true. |
protected InputStream |
getResourceStream()
|
int |
hashCode()
Simple hascode implementation |
| Methods inherited from class org.wings.resource.ClassPathResource |
|---|
getClassLoader, getResourceName |
| Methods inherited from class org.wings.StaticResource |
|---|
getExternalizerFlags, getId, getLength, getMaxBufferSize, getURL, resolveName, setExternalizerFlags, setMaxBufferSize, setMimeType, toString, write |
| Methods inherited from class org.wings.Resource |
|---|
getExtension, getHeaders, getMimeType, getSession, setHeaders |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClassPathStylesheetResource(String resourceFileName)
public ClassPathStylesheetResource(String resourceFileName,
String mimeType)
public ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName)
classLoader - the classLoader from which the resource is obtainedresourceFileName - the css resource relative to the baseClass
public ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName,
String mimeType)
classLoader - the classLoader from which the resource is obtainedresourceFileName - the css resource relative to the baseClassmimeType - the mimetype of the resource
public ClassPathStylesheetResource(ClassLoader classLoader,
String resourceFileName,
String mimeType,
int maxBufferSize)
classLoader - the classLoader from which the resource is obtainedresourceFileName - the css resource relative to the baseClassmimeType - the mimetype of the resourcemaxBufferSize - the maximum buffer size for the style sheet. If
big enough, stylesheet is cached, else parsed again.| Method Detail |
|---|
protected final InputStream getResourceStream()
throws ResourceNotFoundException
getResourceStream in class ClassPathResourceResourceNotFoundExceptionpublic boolean equals(Object o)
equals in class ClassPathResourcepublic int hashCode()
hashCode in class ClassPathResource
protected StaticResource.LimitedBuffer bufferResource()
throws IOException,
ResourceNotFoundException
StaticResourceStaticResource.LimitedBuffer.MAX_SIZE_TO_BUFFER, then the returned Buffer
is empty and does not contain the Resource's content (and the
isValid() flag is false).
bufferResource in class StaticResourceIOException
ResourceNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||