|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.millstone.base.terminal.FileResource
File resources are files or directories on local filesystem. The files and directories are served trough URI:s to the client terminal and thus must be registered to an URI context before they can be used. The resource is automatically registered to the application when it is created.
Field Summary |
Fields inherited from interface org.millstone.base.terminal.ApplicationResource |
DEFAULT_CACHETIME |
Constructor Summary | |
FileResource(java.io.File sourceFile,
Application application)
Create new file resource for providing given file for client terminals. |
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. |
java.io.File |
getSourceFile()
Returns the source file. |
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. |
void |
setSourceFile(java.io.File sourceFile)
Sets the source file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileResource(java.io.File sourceFile, Application application)
Method Detail |
public DownloadStream getStream()
ApplicationResource
getStream
in interface ApplicationResource
public java.io.File getSourceFile()
public void setSourceFile(java.io.File sourceFile)
sourceFile
- The source file to setpublic Application getApplication()
ApplicationResource
getApplication
in interface ApplicationResource
ApplicationResource.getApplication()
public java.lang.String getFilename()
ApplicationResource
getFilename
in interface ApplicationResource
ApplicationResource.getFilename()
public java.lang.String getMIMEType()
Resource
getMIMEType
in interface Resource
Resource.getMIMEType()
public long getCacheTime()
getCacheTime
in interface ApplicationResource
public void setCacheTime(long cacheTime)
cacheTime
- The cache time in milliseconds.public int getBufferSize()
ApplicationResource
If the buffer size is 0, the buffer size is decided by the terminal adapter. The default value is 0.
getBufferSize
in interface ApplicationResource
public void setBufferSize(int bufferSize)
bufferSize
- The size of the buffer in bytes.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |