Class Chunk
java.lang.Object
org.apache.sling.servlets.post.impl.helper.Chunk
Chunk
encapsulates all chunk upload attributes.- Since:
- 2.3.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Return length of the file parameter.long
Return offset of the chunk.boolean
Return true if request contains last chunk as a result upload should be finished.void
setCompleted
(boolean complete) Set complete flagvoid
setLength
(long length) Set length of file parameter.void
setOffsetValue
(long offset) Set offset value.
-
Constructor Details
-
Chunk
public Chunk()
-
-
Method Details
-
getOffset
public long getOffset()Return offset of the chunk.- Returns:
- the offset
-
setOffsetValue
public void setOffsetValue(long offset) Set offset value.- Parameters:
offset
- the offset
-
getLength
public long getLength()Return length of the file parameter.- Returns:
- the length
-
setLength
public void setLength(long length) Set length of file parameter.- Parameters:
length
- the length
-
isCompleted
public boolean isCompleted()Return true if request contains last chunk as a result upload should be finished. It is useful in scenarios where file streaming where file size is not known in advance.- Returns:
- if the chunk is completed
-
setCompleted
public void setCompleted(boolean complete) Set complete flag- Parameters:
complete
- the complete flag
-