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
ConstructorsConstructorDescriptionVHFileDescriptor(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 VHFileDescriptorgetInstance(File p_file) static final VHFileDescriptorgetInstance(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 betruefor streaming, should normally befalse, otherwise server must stream the file up to the web).
-
-
Method Details
-
getFileName
- Specified by:
getFileNamein interfaceIVHFileDescriptor- Returns:
- The name of the file.
-
getPath
- Specified by:
getPathin interfaceIVHFileDescriptor- Returns:
- The path to the file.
-
getContentType
- Specified by:
getContentTypein interfaceIVHFileDescriptor- Returns:
- The MIME content type.
-
isStreamingMode
public boolean isStreamingMode()- Specified by:
isStreamingModein interfaceIVHFileDescriptor- Returns:
- Returns
trueif download should download by stream otherwisefalse
-
getLastModified
- Specified by:
getLastModifiedin interfaceIVHFileDescriptor- Returns:
- The last modified date of the file (could be
null).
-
getInstance
-
getInstance
-
getFile
Description copied from interface:IVHFileDescriptorReturns the file object.- Specified by:
getFilein interfaceIVHFileDescriptor- Returns:
- Returns the file object. Not
null, is not guaranteed that the file exists.
-