| |
|
| java.lang.Object org.millstone.base.terminal.FileResource
FileResource | public class FileResource implements ApplicationResource(Code) | | 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.
author: IT Mill Ltd. version: 3.1.1 since: 3.0 |
Constructor Summary | |
public | FileResource(File sourceFile, Application application) Create new file resource for providing given file for
client terminals. |
FileResource | public FileResource(File sourceFile, Application application)(Code) | | Create new file resource for providing given file for
client terminals.
|
getBufferSize | public int getBufferSize()(Code) | | |
getCacheTime | public long getCacheTime()(Code) | | Get lenght of cache expiracy time.
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. Default is DownloadStream.DEFAULT_CACHETIME.
Cache time in milliseconds |
getSourceFile | public File getSourceFile()(Code) | | Returns the source file.
File |
setBufferSize | public void setBufferSize(int bufferSize)(Code) | | Set the size of the download buffer used for this resource.
Parameters: bufferSize - The size of the buffer in bytes. |
setCacheTime | public void setCacheTime(long cacheTime)(Code) | | Set lenght of cache expiracy time.
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.
Parameters: cacheTime - The cache time in milliseconds. |
setSourceFile | public void setSourceFile(File sourceFile)(Code) | | Sets the source file.
Parameters: sourceFile - The source file to set |
|
|
|