Class UploadInfo
java.lang.Object
org.deltava.beans.UploadInfo
- All Implemented Interfaces:
Serializable
,Cacheable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncacheKey()
Returns the cache key for this object.void
complete
(int chunk) Marks a chunk as complete.int
Returns the chunk size.Returns the start time of the file upload.Returns the upload file name.getID()
Returns the upload ID.Returns the temporary storage location.boolean
Returns whether all chunks have been uploaded.boolean
isComplete
(int chunk) Returns whether a particular chunk has been uploaded.long
length()
Returns the total upload length.void
setFileName
(String fName) Sets the upload filename.void
Sets the upload ID.void
setTempFile
(File f) Updates the temporary storage location.
-
Constructor Details
-
UploadInfo
public UploadInfo(int chunkSize, long totalSize) Creates the bean.- Parameters:
chunkSize
- the chunk size in bytestotalSize
- the total upload size in bytes
-
-
Method Details
-
getChunkSize
public int getChunkSize()Returns the chunk size.- Returns:
- the chunk size in bytes
-
length
public long length()Returns the total upload length.- Returns:
- the upload length in bytes
-
getID
-
getFileName
-
getTempFile
-
getCreatedOn
Returns the start time of the file upload.- Returns:
- the start date/time
-
isComplete
public boolean isComplete(int chunk) Returns whether a particular chunk has been uploaded.- Parameters:
chunk
- the chunk number- Returns:
- TRUE if uploaded, otherwise FALSE
-
isComplete
public boolean isComplete()Returns whether all chunks have been uploaded.- Returns:
- TRUE if all uploaded, otherwise FALSE
-
complete
public void complete(int chunk) Marks a chunk as complete.- Parameters:
chunk
- the chunk number
-
setID
-
setFileName
-
setTempFile
Updates the temporary storage location.- Parameters:
f
- the temp File where chunks are written to
-
cacheKey
-