public class TRScpConnection
extends java.lang.Object
This is a connection which can be used to transfer files to and from a Total Recall VR system in a secure way. Note that it is not possible to use this connection to connect to systems other than Total Recall VR.
Constructor and Description |
---|
TRScpConnection(java.lang.String ipAddress,
java.lang.String userName)
Creates a SCP connection to the specified Total Recall VR system.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the SCP connection to a TOTAL recall system.
|
void |
getAsRemoteFile(java.lang.String remoteFileName,
java.lang.String localFileName)
Copies a file from the Total Recall VR system to a local file with a
different file name than the name of the file on the Total Recall VR system.
|
void |
getRemoteFile(java.lang.String remoteFileName,
java.lang.String localDirName)
Copies a file from the Total Recall VR system to a local directory.
|
void |
getRemoteFiles(java.lang.String[] remoteFileNames,
java.lang.String localDirName)
Copies a set of files from the Total Recall VR system to a local directory.
|
boolean |
isAuthorized()
Test if the user is authorised for SCP operations after establishing
a connection to a Total Recall VR system.
|
void |
putAsLocalFile(java.lang.String localFileName,
java.lang.String remoteFileName,
java.lang.String mode)
Copies a local file to the Total Recall VR system with a different file
name than the name of the local file.
|
void |
putLocalFile(java.lang.String localFileName,
java.lang.String remoteDirName,
java.lang.String mode)
Copies a local file to the Total Recall VR system.
|
public TRScpConnection(java.lang.String ipAddress, java.lang.String userName) throws java.io.IOException
ipAddress
- An IP address of a Total Recall VR system.userName
- In most cases (if not all) it is sufficient to use totalrecall
for this parameter.java.io.IOException
- On problems creating a connection to the specified Total Recall VR
system. See cause for details.public boolean isAuthorized()
true
if the user is authorised.false
otherwise.public void close()
public void getRemoteFile(java.lang.String remoteFileName, java.lang.String localDirName) throws java.io.IOException
remoteFileName
- Fully qualified name of the file on the Total Recall VR system.localDirName
- Fully qualified name of the local directory.java.io.IOException
- On any problem that is associated with completing the request.
See cause for further details on the problem.public void getRemoteFiles(java.lang.String[] remoteFileNames, java.lang.String localDirName) throws java.io.IOException
remoteFileNames
- Fully qualified names of the files on the Total Recall VR system.localDirName
- Fully qualified name of the local directory.java.io.IOException
- On any problem that is associated with completing the request.
See cause for further details on the problem.public void putLocalFile(java.lang.String localFileName, java.lang.String remoteDirName, java.lang.String mode) throws java.io.IOException
localFileName
- Fully qualified name of the local file.remoteDirName
- Fully qualified name of the directory on the Total Recall VR system.mode
- A four digit string which represents the access mode of the file
on the Total Recall VR system. For example 0644
.java.io.IOException
- On any problem that is associated with completing the request.
See cause for further details on the problem.public void getAsRemoteFile(java.lang.String remoteFileName, java.lang.String localFileName) throws java.io.IOException
remoteFileName
- Fully qualified name of the file on the Total Recall VR system.localFileName
- Fully qualified name of the local file.java.io.IOException
- On any problem that is associated with completing the request.
See cause for further details on the problem.public void putAsLocalFile(java.lang.String localFileName, java.lang.String remoteFileName, java.lang.String mode) throws java.io.IOException
localFileName
- Fully qualified name of the local file.remoteFileName
- Fully qualified name of the file on the Total Recall VR system.mode
- A four digit string which represents the access mode of the file
on the Total Recall VR system. For example 0644
.java.io.IOException
- On any problem that is associated with completing the request.
See cause for further details on the problem.Copyright ©, 2005-2019 Prolancer Pty Ltd, Sydney Australia.