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 |
|---|---|
protected com.automic.protocol.Message |
createNATRequest(ConnectionAttributes sessionInfo)
Sub classes may override this method send messages in NAT protocol to the AE.
|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
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.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
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.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, isAllowedInClientZero, send, setMessageBox, showQuarantineNotificationpublic 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.protected java.lang.String getSrc()
XMLRequestgetSrc in class XMLRequestprotected void createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
XMLRequestcreateRequest in class XMLRequestdoc - Document, used to create new Elementsrequest - Request Element - classes append information to this request elementsessionInfo - Information about the sessionprotected com.automic.protocol.Message createNATRequest(ConnectionAttributes sessionInfo)
XMLRequestcreateNATRequest in class XMLRequestsessionInfo - Session infosprotected void handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session)
handleContent in class XMLRequestpublic 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()