Package ai.nightfall.scan.model
Class UploadFileChunkRequest
java.lang.Object
ai.nightfall.scan.model.UploadFileChunkRequest
An object representing a request to upload a chunk of file data to the Nightfall API.
-
Constructor Summary
ConstructorsConstructorDescriptionUploadFileChunkRequest(UUID fileUploadID, long fileOffset) Create a new instance of a file chunk upload request.UploadFileChunkRequest(UUID fileUploadID, long fileOffset, byte[] content) Create a new instance of a file chunk upload request. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the request payload.longGet the file offset.Get the file ID.voidsetContent(byte[] content) Set the request payload.
-
Constructor Details
-
UploadFileChunkRequest
Create a new instance of a file chunk upload request.- Parameters:
fileUploadID- the ID of the filefileOffset- the offset at which to upload bytes
-
UploadFileChunkRequest
Create a new instance of a file chunk upload request.- Parameters:
fileUploadID- the ID of the filefileOffset- the offset at which to upload bytescontent- the payload bytes to upload
-
-
Method Details
-
getFileUploadID
Get the file ID.- Returns:
- the file ID
-
getFileOffset
public long getFileOffset()Get the file offset.- Returns:
- the offset at which to upload bytes
-
getContent
public byte[] getContent()Get the request payload.- Returns:
- the payload bytes to upload
-
setContent
public void setContent(byte[] content) Set the request payload.- Parameters:
content- the content to upload
-