public class DownloadBinary extends XMLRequest
Constructor and Description |
---|
DownloadBinary(UC4ObjectName storeObject,
java.lang.String entryName,
PlatformSwHwType platformSwHw)
Creates a new request to download a file from a STORE object.
|
DownloadBinary(UC4ObjectName storeObject,
java.lang.String entryName,
PlatformSwHwType platformSwHw,
java.io.File outputFile)
Creates a new request to download a file from a STORE object.
|
DownloadBinary(UC4ObjectName storeObject,
java.lang.String entryName,
PlatformSwHwType platformSwHw,
java.io.File outputFile,
java.lang.String resname)
Creates a new request to download a file from a STORE object.
|
DownloadBinary(UC4ObjectName storeObject,
java.lang.String entryName,
PlatformSwHwType platformSwHw,
java.lang.String resname)
Creates a new request to download a file from STORE object.
|
Modifier and Type | Method and Description |
---|---|
java.nio.ByteBuffer |
getBinaryContent()
Returns the file as ByteBuffer.
|
java.lang.String |
getContentAsText()
Returns the content of a text file.
|
java.lang.String |
getContentAsText(java.lang.String lineSeparator)
Returns the content of a text file using a specified line line seperator.
|
java.io.IOException |
getFileIOException()
Returns the
Exception that occured during the writing of the outputfile or null
if it was successful. |
java.lang.String |
getResourceName()
Returns the resource name which was set, or null if it was not set.
|
boolean |
isBinary()
Returns true if the file is a binary and not a text file.
|
boolean |
isOutputFileOK()
Returns
true if the outputfile was saved successfully. |
boolean |
isText()
Returns true if the resource is a text.
|
getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send
public DownloadBinary(UC4ObjectName storeObject, java.lang.String entryName, PlatformSwHwType platformSwHw)
storeObject
- Name of the STORE objectentryName
- Name of the entry which is used to identify the file.platformSwHw
- Combined type of Platform, SW, HW of the entry.public DownloadBinary(UC4ObjectName storeObject, java.lang.String entryName, PlatformSwHwType platformSwHw, java.io.File outputFile)
storeObject
- Name of the STORE objectentryName
- Name of the entry which is used to identify the file.platformSwHw
- Combined type of Platform, SW, HW of the entry.outputFile
- Outputfile, where the content will be automatically be stored.public DownloadBinary(UC4ObjectName storeObject, java.lang.String entryName, PlatformSwHwType platformSwHw, java.lang.String resname)
storeObject
- Name of the STORE objectentryName
- Name of the entry which is used to identify the file.platformSwHw
- Combined type of Platform, SW, HW of the entry.resname
- resource name of the entry which is used to identify the file.public DownloadBinary(UC4ObjectName storeObject, java.lang.String entryName, PlatformSwHwType platformSwHw, java.io.File outputFile, java.lang.String resname)
storeObject
- Name of the STORE objectentryName
- Name of the entry which is used to identify the file.platformSwHw
- Combined type of Platform, SW, HW of the entry.outputFile
- Outputfile, where the content will be automatically be stored.resname
- Resource name of the entry which is used to identify the file.public boolean isText()
public boolean isBinary()
public java.nio.ByteBuffer getBinaryContent()
public java.lang.String getContentAsText()
isText()
returns true
.
The default line seperator is used.public java.lang.String getContentAsText(java.lang.String lineSeparator)
lineSeparator
- Characters used as line seperator.public boolean isOutputFileOK()
true
if the outputfile was saved successfully.
If this method returns false
the method getFileIOException
can be used to get the exception which occured during the writing of the outputfile.public java.io.IOException getFileIOException()
Exception
that occured during the writing of the outputfile or null
if it was successful.public java.lang.String getResourceName()