| java.lang.Object org.wings.Resource org.wings.StaticResource
All known Subclasses: org.wings.resource.FileResource, org.wings.resource.ClassPathResource,
buffer | protected transient LimitedBuffer buffer(Code) | | A buffer for temporal storage of the resource
|
externalizerFlags | protected int externalizerFlags(Code) | | Flags that influence the behaviour of the externalize manager
|
maxBufferSize | protected int maxBufferSize(Code) | | The max size of the buffer
|
size | protected int size(Code) | | The size of this resource. Initially, this will be '-1', but
the value is updated, once the Resource is delivered.
|
StaticResource | protected StaticResource(String extension, String mimeType)(Code) | | A static resource that is obtained from the specified class loader
|
bufferResource | protected LimitedBuffer bufferResource() throws ResourceNotFoundException, IOException(Code) | | Reads the resource into an LimitedBuffer and returns it. If the
size of the resource is larger than
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).
buffered resource as LimitedBuffer, that may be invalid,if the size of the resource is beyond MAX_SIZE_TO_BUFFER. It isnull, if the Resource returned an invalid stream. throws: IOException - |
getExternalizerFlags | public int getExternalizerFlags()(Code) | | |
getId | public String getId()(Code) | | Get the id that identifies this resource as an externalized object.
If the object has not been externalized yet, it will be externalized.
the externalization id |
getLength | final public int getLength()(Code) | | Return the size in bytes of the resource, if known
|
getMaxBufferSize | public int getMaxBufferSize()(Code) | | |
setMaxBufferSize | public void setMaxBufferSize(int maxBufferSize)(Code) | | |
write | public void write(Device out) throws IOException, ResourceNotFoundException(Code) | | writes the Resource to the given Stream. If the resource
is not larger than
LimitedBuffer.MAX_SIZE_TO_BUFFER , then
an internal buffer caches the content the first time, so that it
is delivered as fast as possible at any subsequent calls.
Parameters: out - the sink, the content of the resource shouldbe written to. |
|
|