|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.millstone.base.terminal.ClassResource
Class resource is a named resource accessed with the class loader. This can be used to access resources such as icons, files, etc.
Class.getResource(java.lang.String)| Field Summary |
| Fields inherited from interface org.millstone.base.terminal.ApplicationResource |
DEFAULT_CACHETIME |
| Constructor Summary | |
ClassResource(java.lang.Class associatedClass,
java.lang.String resourceName,
Application application)
Create new application resource instance. |
|
ClassResource(java.lang.String resourceName,
Application application)
Create new application resource instance. |
|
| Method Summary | |
Application |
getApplication()
Get the application of the resource |
int |
getBufferSize()
Get the size of the download buffer used for this resource. |
long |
getCacheTime()
Get lenght of cache expiracy time. |
java.lang.String |
getFilename()
Get virtual filename for the resource |
java.lang.String |
getMIMEType()
Get the MIME type of the resource. |
DownloadStream |
getStream()
Get resource as stream |
void |
setBufferSize(int bufferSize)
Set the size of the download buffer used for this resource. |
void |
setCacheTime(long cacheTime)
Set lenght of cache expiracy time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ClassResource(java.lang.String resourceName,
Application application)
resourceName - Unique identifier of the resource within the application.application - The application this resource will be added to.
public ClassResource(java.lang.Class associatedClass,
java.lang.String resourceName,
Application application)
associatedClass - The class of the which the resource is associated.resourceName - Unique identifier of the resource within the application.application - The application this resource will be added to.| Method Detail |
public java.lang.String getMIMEType()
Resource
getMIMEType in interface Resourcepublic Application getApplication()
ApplicationResource
getApplication in interface ApplicationResourcepublic java.lang.String getFilename()
ApplicationResource
getFilename in interface ApplicationResourcepublic DownloadStream getStream()
ApplicationResource
getStream in interface ApplicationResourcepublic int getBufferSize()
ApplicationResourceIf the buffer size is 0, the buffer size is decided by the terminal adapter. The default value is 0.
getBufferSize in interface ApplicationResourcepublic void setBufferSize(int bufferSize)
bufferSize - The size of the buffer in bytes.public long getCacheTime()
ApplicationResourceThis gives the adapter the possibility cache streams sent to the client. The caching may be made in adapter or at the client if the client supports caching. Default is DEFAULT_CACHETIME.
getCacheTime in interface ApplicationResourcepublic void setCacheTime(long cacheTime)
This gives the adapter the possibility cache streams sent to the client. The caching may be made in adapter or at the client if the client supports caching. Zero or negavive value disbales the caching of this stream.
cacheTime - The cache time in milliseconds.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||