public class UploadBinary extends XMLRequest
| Modifier and Type | Class and Description |
|---|---|
static class |
UploadBinary.ContentType
Content-type of the file (BINARY, TEXT,...).
|
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_UPLOAD_SIZE
Max file size in bytes for uploads.
|
| Constructor and Description |
|---|
UploadBinary(UC4ObjectName storeObject,
String entryName,
PlatformSwHwType osPlatformHw,
boolean isUpdate,
ByteBuffer buffer)
Creates a new request to upload a file to a STORE object.
|
UploadBinary(UC4ObjectName storeObject,
String entryName,
PlatformSwHwType osPlatformHw,
boolean isUpdate,
File inputFile)
Creates a new request to upload a file to a STORE object.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getContentLen()
Returns the length of the upload-content.
|
String |
getEntryName()
Return the entryName used for the Data to transfer.
|
Exception |
getFileException()
Returns the
Exception that occured during the reading of the inputFile or null
if it was successful. |
boolean |
isFileUploadOK()
Returns
true if the inputFile was uploaded successfully. |
void |
setContentType(UploadBinary.ContentType contentType)
Sets the content type.
|
void |
setFileName(String fileName)
Set the resource file name.
|
void |
setVersion(String version)
Set the resource version.
|
getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send, showQuarantineNotificationpublic static final int MAX_UPLOAD_SIZE
public UploadBinary(UC4ObjectName storeObject, String entryName, PlatformSwHwType osPlatformHw, boolean isUpdate, File inputFile)
storeObject - Name of the STORE object.entryName - Name of the entry in the STORE objectosPlatformHw - Combined type of OS, Platform, HW of the entry.isUpdate - Must be set to true if a resource should be updated.inputFile - File which should be uploadedpublic UploadBinary(UC4ObjectName storeObject, String entryName, PlatformSwHwType osPlatformHw, boolean isUpdate, ByteBuffer buffer)
storeObject - Name of the STORE objectentryName - Name of the entry which is used to identify the file.osPlatformHw - Combined type of OS, Platform, HW of the entry.isUpdate - Must be set to true if a resource should be updated.buffer - File contentpublic void setVersion(String version)
version - Versionpublic void setFileName(String fileName)
fileName - Name of the filepublic void setContentType(UploadBinary.ContentType contentType)
contentType - content-type of the filepublic String getEntryName()
Stringpublic boolean isFileUploadOK()
true if the inputFile was uploaded successfully.
If this method returns false there are two possible error-sources:
public Exception getFileException()
Exception that occured during the reading of the inputFile or null
if it was successful.public long getContentLen()
Copyright © 2021. All rights reserved.