Package de.uplanet.lucy.server.util
Class VHFileDescriptor
java.lang.Object
de.uplanet.lucy.server.util.VHFileDescriptor
- All Implemented Interfaces:
IVHFileDescriptor
Holds the necessary information for the
FileValueHolder
.-
Constructor Summary
ConstructorDescriptionVHFileDescriptor
(File p_file, String p_strFileName, String p_strContentType, Date p_lastModified, boolean p_bStreamingMode) -
Method Summary
Modifier and TypeMethodDescriptiongetFile()
Returns the file object.static final VHFileDescriptor
getInstance
(File p_file) static final VHFileDescriptor
getInstance
(String p_strPath) getPath()
boolean
-
Constructor Details
-
VHFileDescriptor
public VHFileDescriptor(File p_file, String p_strFileName, String p_strContentType, Date p_lastModified, boolean p_bStreamingMode) - Parameters:
p_file
- The physical filep_strFileName
- The file namep_strContentType
- The content type of the filep_lastModified
- The last modified date of the filep_bStreamingMode
- Should betrue
for streaming, should normally befalse
, otherwise server must stream the file up to the web).
-
-
Method Details
-
getFileName
- Specified by:
getFileName
in interfaceIVHFileDescriptor
- Returns:
- The name of the file.
-
getPath
- Specified by:
getPath
in interfaceIVHFileDescriptor
- Returns:
- The path to the file.
-
getContentType
- Specified by:
getContentType
in interfaceIVHFileDescriptor
- Returns:
- The MIME content type.
-
isStreamingMode
public boolean isStreamingMode()- Specified by:
isStreamingMode
in interfaceIVHFileDescriptor
- Returns:
- Returns
true
if download should download by stream otherwisefalse
-
getLastModified
- Specified by:
getLastModified
in interfaceIVHFileDescriptor
- Returns:
- The last modified date of the file (could be
null
).
-
getInstance
-
getInstance
-
getFile
Description copied from interface:IVHFileDescriptor
Returns the file object.- Specified by:
getFile
in interfaceIVHFileDescriptor
- Returns:
- Returns the file object. Not
null
, is not guaranteed that the file exists.
-