public class SmbUtils
extends java.lang.Object
implements com.actelion.research.mapReduceGeneric.IRemoteContextStore
| Constructor and Description |
|---|
SmbUtils(java.lang.String username,
java.lang.String password,
java.lang.String domain,
java.lang.String share)
Authentificates via domain/username:password if password !=null, otherwise just via username (used as userinfo).
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyToRemote(byte[] bytes,
java.lang.String remoteFolder,
java.lang.String fileNameNew) |
java.lang.String |
generateUniqueFilename(java.lang.String prefix,
java.lang.String ending)
Generates a unique filename, e.g.
|
java.util.List<java.lang.String> |
listFilenames(java.lang.String remoteFolder) |
java.util.List<com.actelion.research.mapReduceGeneric.RemoteFile> |
listFilenames(java.lang.String remoteFolder,
boolean sortByDate) |
byte[] |
readFromRemote(java.lang.String remoteFile) |
public SmbUtils(java.lang.String username,
java.lang.String password,
java.lang.String domain,
java.lang.String share)
username - password - domain - share - public void copyToRemote(byte[] bytes,
java.lang.String remoteFolder,
java.lang.String fileNameNew)
throws java.io.IOException
copyToRemote in interface com.actelion.research.mapReduceGeneric.IRemoteContextStorejava.io.IOExceptionpublic java.lang.String generateUniqueFilename(java.lang.String prefix,
java.lang.String ending)
generateUniqueFilename in interface com.actelion.research.mapReduceGeneric.IRemoteContextStoreprefix - ending - public byte[] readFromRemote(java.lang.String remoteFile)
throws java.io.IOException
readFromRemote in interface com.actelion.research.mapReduceGeneric.IRemoteContextStorejava.io.IOExceptionpublic java.util.List<java.lang.String> listFilenames(java.lang.String remoteFolder)
throws java.io.IOException
listFilenames in interface com.actelion.research.mapReduceGeneric.IRemoteContextStorejava.io.IOExceptionpublic java.util.List<com.actelion.research.mapReduceGeneric.RemoteFile> listFilenames(java.lang.String remoteFolder,
boolean sortByDate)
throws java.io.IOException
listFilenames in interface com.actelion.research.mapReduceGeneric.IRemoteContextStorejava.io.IOException