Class Chunk
- java.lang.Object
-
- org.apache.sling.servlets.post.impl.helper.Chunk
-
public class Chunk extends Object
Chunkencapsulates all chunk upload attributes.- Since:
- 2.3.4
-
-
Constructor Summary
Constructors Constructor Description Chunk()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetLength()Return length of the file parameter.longgetOffset()Return offset of the chunk.booleanisCompleted()Return 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.
-
-
-
Method Detail
-
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
-
-