Class Chunk
- java.lang.Object
-
- org.apache.sling.servlets.post.impl.helper.Chunk
-
public class Chunk extends Object
Chunk
encapsulates 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 long
getLength()
Return length of the file parameter.long
getOffset()
Return offset of the chunk.boolean
isCompleted()
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.
-
-
-
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
-
-