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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturn length of the file parameter.longReturn offset of the chunk.booleanReturn true if request contains last chunk as a result upload should be finished.voidsetCompleted(boolean complete) Set complete flagvoidsetLength(long length) Set length of file parameter.voidsetOffsetValue(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
-